summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti/wl18xx
diff options
context:
space:
mode:
authorIdo Yariv <ido@wizery.com>2012-08-15 18:29:04 +0300
committerLuciano Coelho <luca@coelho.fi>2012-09-27 12:13:53 +0300
commita8311c8a9a7c41de9cc2d5e1573ff7005b4959ab (patch)
tree867585b226094cc098f30b9bd86ac15619029aec /drivers/net/wireless/ti/wl18xx
parent792a58a8720f02c8f340583f6ee54c9eb46adf0b (diff)
downloadtalos-op-linux-a8311c8a9a7c41de9cc2d5e1573ff7005b4959ab.tar.gz
talos-op-linux-a8311c8a9a7c41de9cc2d5e1573ff7005b4959ab.zip
wlcore: Fix unbalanced interrupts enablement
The interrupt line is enabled by wl12xx_enable_interrupts and wl18xx_enable_interrupts, but it will not be disabled in all failure paths. Fix this. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
Diffstat (limited to 'drivers/net/wireless/ti/wl18xx')
-rw-r--r--drivers/net/wireless/ti/wl18xx/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c
index fa7e6ef3f6a2..9bf2d8755c5b 100644
--- a/drivers/net/wireless/ti/wl18xx/main.c
+++ b/drivers/net/wireless/ti/wl18xx/main.c
@@ -811,6 +811,13 @@ static int wl18xx_enable_interrupts(struct wl1271 *wl)
ret = wlcore_write_reg(wl, REG_INTERRUPT_MASK,
WL1271_ACX_INTR_ALL & ~intr_mask);
+ if (ret < 0)
+ goto disable_interrupts;
+
+ return ret;
+
+disable_interrupts:
+ wlcore_disable_interrupts(wl);
out:
return ret;
OpenPOWER on IntegriCloud