Staging: wlags49_h2: potential NULL dereference
wl_device_dealloc() dereferences the "dev" paramter, so let's move it under the check for NULL. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
95f18c0cb2
commit
bed861ba2a
@@ -177,9 +177,8 @@ static void wl_adapter_detach(struct pcmcia_device *link)
|
|||||||
if (dev) {
|
if (dev) {
|
||||||
unregister_wlags_sysfs(dev);
|
unregister_wlags_sysfs(dev);
|
||||||
unregister_netdev(dev);
|
unregister_netdev(dev);
|
||||||
}
|
|
||||||
|
|
||||||
wl_device_dealloc(dev);
|
wl_device_dealloc(dev);
|
||||||
|
}
|
||||||
|
|
||||||
DBG_LEAVE(DbgInfo);
|
DBG_LEAVE(DbgInfo);
|
||||||
} /* wl_adapter_detach */
|
} /* wl_adapter_detach */
|
||||||
|
Reference in New Issue
Block a user