aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-05-14 16:56:46 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-14 18:43:44 -0400
commitbed861ba2a020c267a987c63aca2705d460f1350 (patch)
tree9368e6a208c3d27cfd5438b5e80f5c04adb5b3e0 /drivers
parent95f18c0cb2d23f6051fd4f40cc5d0836fdeda08f (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/wlags49_h2/wl_cs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/wlags49_h2/wl_cs.c b/drivers/staging/wlags49_h2/wl_cs.c
index 7084f414846e..7c7c77f9c862 100644
--- a/drivers/staging/wlags49_h2/wl_cs.c
+++ b/drivers/staging/wlags49_h2/wl_cs.c
@@ -177,10 +177,9 @@ static void wl_adapter_detach(struct pcmcia_device *link)
177 if (dev) { 177 if (dev) {
178 unregister_wlags_sysfs(dev); 178 unregister_wlags_sysfs(dev);
179 unregister_netdev(dev); 179 unregister_netdev(dev);
180 wl_device_dealloc(dev);
180 } 181 }
181 182
182 wl_device_dealloc(dev);
183
184 DBG_LEAVE(DbgInfo); 183 DBG_LEAVE(DbgInfo);
185} /* wl_adapter_detach */ 184} /* wl_adapter_detach */
186/*============================================================================*/ 185/*============================================================================*/