提交 f36dc3f8 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 21a3e67a
...@@ -177,10 +177,9 @@ static void wl_adapter_detach(struct pcmcia_device *link) ...@@ -177,10 +177,9 @@ 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 */
/*============================================================================*/ /*============================================================================*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册