summaryrefslogtreecommitdiffstats
path: root/drivers/memstick
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2019-10-05 13:21:01 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-29 09:20:07 +0100
commit5f19cbb3ab3f2472bef6965d6cd427a9e22b27a9 (patch)
treefaf5395f5cf459c2485f60c4a087be22c0fafeb8 /drivers/memstick
parent0b95aaae783fa422bc213337de29b710898ff8ec (diff)
downloadlinux-stable-5f19cbb3ab3f2472bef6965d6cd427a9e22b27a9.tar.gz
linux-stable-5f19cbb3ab3f2472bef6965d6cd427a9e22b27a9.tar.bz2
linux-stable-5f19cbb3ab3f2472bef6965d6cd427a9e22b27a9.zip
memstick: jmb38x_ms: Fix an error handling path in 'jmb38x_ms_probe()'
commit 28c9fac09ab0147158db0baeec630407a5e9b892 upstream. If 'jmb38x_ms_count_slots()' returns 0, we must undo the previous 'pci_request_regions()' call. Goto 'err_out_int' to fix it. Fixes: 60fdd931d577 ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/memstick')
-rw-r--r--drivers/memstick/host/jmb38x_ms.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/memstick/host/jmb38x_ms.c b/drivers/memstick/host/jmb38x_ms.c
index bcdca9fbef51..29f5021d21ea 100644
--- a/drivers/memstick/host/jmb38x_ms.c
+++ b/drivers/memstick/host/jmb38x_ms.c
@@ -949,7 +949,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)