Commit 23436825 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

staging: wilc1000: NULL dereference on error

We can't pass NULL pointers to destroy_workqueue().
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 23535c13
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment