Skip to content

Commit

Permalink
Staging: wlags49_h2: potential NULL dereference
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and gregkh committed May 14, 2012
1 parent 95f18c0 commit bed861b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/wlags49_h2/wl_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,9 @@ static void wl_adapter_detach(struct pcmcia_device *link)
if (dev) {
unregister_wlags_sysfs(dev);
unregister_netdev(dev);
wl_device_dealloc(dev);
}

wl_device_dealloc(dev);

DBG_LEAVE(DbgInfo);
} /* wl_adapter_detach */
/*============================================================================*/
Expand Down

0 comments on commit bed861b

Please sign in to comment.