[PATCH] staging: ks7010: fix missing destroy_workqueue() on error in ks7010_sdio_probe
From: Qinglang Miao
Date: Wed Oct 28 2020 - 18:08:42 EST
Add the missing destroy_workqueue() before return from
ks7010_sdio_probe in the error handling case.
Signed-off-by: Qinglang Miao <miaoqinglang@xxxxxxxxxx>
---
drivers/staging/ks7010/ks7010_sdio.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index 6b2660c94..af68961dd 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -1029,10 +1029,12 @@ static int ks7010_sdio_probe(struct sdio_func *func,
ret = register_netdev(priv->net_dev);
if (ret)
- goto err_free_netdev;
+ goto err_destroy_wq;
return 0;
+ err_destroy_wq:
+ destroy_workqueue(priv->wq);
err_free_netdev:
free_netdev(netdev);
err_release_irq:
--
2.23.0