staging: r8712u: Fix Smatch warning
authorLarry Finger <Larry.Finger@lwfinger.net>
Sat, 3 Mar 2012 03:06:49 +0000 (21:06 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Mar 2012 21:36:45 +0000 (13:36 -0800)
The patch 2080913e017a: "staging: r8712u: Fix regression caused by
commit 8c213fa" from Feb 25, 2012, leads to the following Smatch
complaint:

drivers/staging/rtl8712/usb_intf.c:629 r871xu_dev_remove()
 warn: variable dereferenced before check 'padapter' (see line 625)

The fix is to move the new statements inside the block where padapter
is not NULL.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

No differences found