summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-07-16 12:07:55 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-21 17:28:21 +0200
commit23436825e671cdd55c45d151ddc66fd3c47d10e9 (patch)
treed040fad45214119c1232abc2a7d533c619b9658e /drivers/staging
parentstaging: wilc1000: txq_event: Fix coding error (diff)
downloadlinux-23436825e671cdd55c45d151ddc66fd3c47d10e9.tar.xz
linux-23436825e671cdd55c45d151ddc66fd3c47d10e9.zip
staging: wilc1000: NULL dereference on error
We can't pass NULL pointers to destroy_workqueue(). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/wilc1000/host_interface.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 0b1760cba6e3..78f524fcd214 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3363,7 +3363,7 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
if (!hif_workqueue) {
netdev_err(vif->ndev, "Failed to create workqueue\n");
result = -ENOMEM;
- goto _fail_mq_;
+ goto _fail_;
}
setup_timer(&periodic_rssi, GetPeriodicRSSI,
@@ -3391,7 +3391,6 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
clients_count++;
-_fail_mq_:
destroy_workqueue(hif_workqueue);
_fail_:
return result;