1
0
Fork 0

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>
hifive-unleashed-5.1
Dan Carpenter 2016-07-16 13:07:55 +03:00 committed by Greg Kroah-Hartman
parent 23535c1322
commit 23436825e6
1 changed files with 1 additions and 2 deletions

View File

@ -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;