Skip to content

Commit

Permalink
[PATCH] orinoco: orinoco_send_wevents() could return without unlocking.
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Roskin <proski@gnu.org>

orinoco_send_wevents() could return without unlocking.

Failure to read BSSID from the hardware would cause orinoco_send_wevents() to
return with lock held.  Found by sparse.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
  • Loading branch information
Pavel Roskin authored and Jeff Garzik committed Sep 23, 2005
1 parent f3cb4cc commit 8aeabc3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/wireless/orinoco.c
Original file line number Diff line number Diff line change
Expand Up @@ -1112,12 +1112,14 @@ static void orinoco_send_wevents(struct net_device *dev)
err = hermes_read_ltv(hw, IRQ_BAP, HERMES_RID_CURRENTBSSID,
ETH_ALEN, NULL, wrqu.ap_addr.sa_data);
if (err != 0)
return;
goto out;

wrqu.ap_addr.sa_family = ARPHRD_ETHER;

/* Send event to user space */
wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL);

out:
orinoco_unlock(priv, &flags);
}

Expand Down

0 comments on commit 8aeabc3

Please sign in to comment.