Skip to content

Commit

Permalink
memstick: jmb38x_ms: Fix an error handling path in 'jmb38x_ms_probe()'
Browse files Browse the repository at this point in the history
If 'jmb38x_ms_count_slots()' returns 0, we must undo the previous
'pci_request_regions()' call.

Goto 'err_out_int' to fix it.

Fixes: 60fdd93 ("memstick: add support for JMicron jmb38x MemoryStick host controller")
Cc: stable@vger.kernel.org
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Christophe JAILLET authored and Ulf Hansson committed Oct 9, 2019
1 parent 19ec6bb commit 28c9fac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/memstick/host/jmb38x_ms.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ static int jmb38x_ms_probe(struct pci_dev *pdev,
if (!cnt) {
rc = -ENODEV;
pci_dev_busy = 1;
goto err_out;
goto err_out_int;
}

jm = kzalloc(sizeof(struct jmb38x_ms)
Expand Down

0 comments on commit 28c9fac

Please sign in to comment.