Commit 8aeabc37 authored by Pavel Roskin's avatar Pavel Roskin Committed by Jeff Garzik

[PATCH] orinoco: orinoco_send_wevents() could return without unlocking.

Signed-off-by: default avatarPavel 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: default avatarJeff Garzik <jgarzik@pobox.com>
parent f3cb4cc1
...@@ -1112,12 +1112,14 @@ static void orinoco_send_wevents(struct net_device *dev) ...@@ -1112,12 +1112,14 @@ static void orinoco_send_wevents(struct net_device *dev)
err = hermes_read_ltv(hw, IRQ_BAP, HERMES_RID_CURRENTBSSID, err = hermes_read_ltv(hw, IRQ_BAP, HERMES_RID_CURRENTBSSID,
ETH_ALEN, NULL, wrqu.ap_addr.sa_data); ETH_ALEN, NULL, wrqu.ap_addr.sa_data);
if (err != 0) if (err != 0)
return; goto out;
wrqu.ap_addr.sa_family = ARPHRD_ETHER; wrqu.ap_addr.sa_family = ARPHRD_ETHER;
/* Send event to user space */ /* Send event to user space */
wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL);
out:
orinoco_unlock(priv, &flags); orinoco_unlock(priv, &flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment