summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-03-19 19:21:44 -0800
committerJohn W. Linville <linville@tuxdriver.com>2006-03-23 16:16:57 -0500
commit971d1e69229f3dfc6dd233b8f4b82df2c35eedd8 (patch)
treea255814d0183a9d6541e3206c10ad966836d3856
parent9e75af30d529d54fc650586776c100d0665c0c93 (diff)
downloadop-kernel-dev-971d1e69229f3dfc6dd233b8f4b82df2c35eedd8.zip
op-kernel-dev-971d1e69229f3dfc6dd233b8f4b82df2c35eedd8.tar.gz
[PATCH] hostap: Fix hw reset after CMDCODE_ACCESS_WRITE timeout
The Coverity checker (CID: 59) noted that the call to prism2_hw_reset() was dead code. Move prism2_hw_reset() call to a place where it is actually executed. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/hostap/hostap_hw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c
index b1f142d..328e9a1 100644
--- a/drivers/net/wireless/hostap/hostap_hw.c
+++ b/drivers/net/wireless/hostap/hostap_hw.c
@@ -928,15 +928,15 @@ static int hfa384x_set_rid(struct net_device *dev, u16 rid, void *buf, int len)
res = hfa384x_cmd(dev, HFA384X_CMDCODE_ACCESS_WRITE, rid, NULL, NULL);
up(&local->rid_bap_sem);
+
if (res) {
printk(KERN_DEBUG "%s: hfa384x_set_rid: CMDCODE_ACCESS_WRITE "
"failed (res=%d, rid=%04x, len=%d)\n",
dev->name, res, rid, len);
- return res;
- }
- if (res == -ETIMEDOUT)
- prism2_hw_reset(dev);
+ if (res == -ETIMEDOUT)
+ prism2_hw_reset(dev);
+ }
return res;
}
OpenPOWER on IntegriCloud