From: Pavel Roskin Date: Fri, 23 Sep 2005 08:18:06 +0000 (-0400) Subject: [PATCH] orinoco: orinoco_send_wevents() could return without unlocking. X-Git-Tag: v2.6.15-rc1~733^2~1^2~80 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=8aeabc375041a5fe9c9be315472497b2e0547eed;p=~emulex%2Finfiniband.git [PATCH] orinoco: orinoco_send_wevents() could return without unlocking. Signed-off-by: Pavel Roskin 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 --- diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index 8b93b44291d..29cb5d81b67 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c @@ -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); }