msm: sdio_cmux: fix corner case in back to back probes
If back to back probes occur because of subsystem restart, and
sdio_open() fails multiple times, sdio_cmux_probe() could attempt to
re-free an already freed workqueue, causing a kernel panic.
The cmux workqueues should not be freed once allocated and the driver
goes into the initialized state. Change the error handling to correct
that.
CRs-Fixed: 295466
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
diff --git a/arch/arm/mach-msm/sdio_cmux.c b/arch/arm/mach-msm/sdio_cmux.c
index c47e563..2965fc9 100644
--- a/arch/arm/mach-msm/sdio_cmux.c
+++ b/arch/arm/mach-msm/sdio_cmux.c
@@ -776,7 +776,7 @@
if (r < 0) {
mutex_unlock(&modem_reset_lock);
pr_err("%s: sdio_open() failed\n", __func__);
- goto error2;
+ goto error0;
}
abort_tx = 0;
mutex_unlock(&modem_reset_lock);