Skip to content

Commit

Permalink
b43: Fix swatch warning
Browse files Browse the repository at this point in the history
Swatch reports the following warning for main.c:

  CHECK   drivers/net/wireless/b43/main.c
drivers/net/wireless/b43/main.c +4115 b43_wireless_core_stop(7) warn: variable dereferenced before check 'dev'

After analysis, this is not a bug, but a false warning. Nonetheless,
a cleanup is in order to prevent some future janitor proposing
the wrong fix, as I did in my original patch.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Larry Finger authored and John W. Linville committed Aug 29, 2011
1 parent 1ba45b9 commit 9a53bf5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/wireless/b43/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4131,10 +4131,13 @@ static void b43_op_configure_filter(struct ieee80211_hw *hw,
* because the core might be gone away while we unlocked the mutex. */
static struct b43_wldev * b43_wireless_core_stop(struct b43_wldev *dev)
{
struct b43_wl *wl = dev->wl;
struct b43_wl *wl;
struct b43_wldev *orig_dev;
u32 mask;

if (!dev)
return NULL;
wl = dev->wl;
redo:
if (!dev || b43_status(dev) < B43_STAT_STARTED)
return dev;
Expand Down

0 comments on commit 9a53bf5

Please sign in to comment.