summaryrefslogtreecommitdiff
path: root/drivers/staging/wilc1000
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-07-16 13:07:55 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-21 17:28:21 +0200
commit23436825e671cdd55c45d151ddc66fd3c47d10e9 (patch)
treed040fad45214119c1232abc2a7d533c619b9658e /drivers/staging/wilc1000
parent23535c1322e42e71f32bfbeae9970f4dba31e3bd (diff)
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/wilc1000')
-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;