aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorIdo Yariv <ido@wizery.com>2012-08-15 11:29:04 -0400
committerLuciano Coelho <luca@coelho.fi>2012-09-27 05:13:53 -0400
commita8311c8a9a7c41de9cc2d5e1573ff7005b4959ab (patch)
tree867585b226094cc098f30b9bd86ac15619029aec /drivers/net/wireless
parent792a58a8720f02c8f340583f6ee54c9eb46adf0b (diff)
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')
-rw-r--r--drivers/net/wireless/ti/wl12xx/main.c9
-rw-r--r--drivers/net/wireless/ti/wl18xx/main.c7
2 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c
index f49ce7c633b6..630b4d4cea04 100644
--- a/drivers/net/wireless/ti/wl12xx/main.c
+++ b/drivers/net/wireless/ti/wl12xx/main.c
@@ -1184,9 +1184,16 @@ static int wl12xx_enable_interrupts(struct wl1271 *wl)
1184 ret = wlcore_write_reg(wl, REG_INTERRUPT_MASK, 1184 ret = wlcore_write_reg(wl, REG_INTERRUPT_MASK,
1185 WL1271_ACX_INTR_ALL & ~(WL12XX_INTR_MASK)); 1185 WL1271_ACX_INTR_ALL & ~(WL12XX_INTR_MASK));
1186 if (ret < 0) 1186 if (ret < 0)
1187 goto out; 1187 goto disable_interrupts;
1188 1188
1189 ret = wlcore_write32(wl, WL12XX_HI_CFG, HI_CFG_DEF_VAL); 1189 ret = wlcore_write32(wl, WL12XX_HI_CFG, HI_CFG_DEF_VAL);
1190 if (ret < 0)
1191 goto disable_interrupts;
1192
1193 return ret;
1194
1195disable_interrupts:
1196 wlcore_disable_interrupts(wl);
1190 1197
1191out: 1198out:
1192 return ret; 1199 return ret;
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)
811 811
812 ret = wlcore_write_reg(wl, REG_INTERRUPT_MASK, 812 ret = wlcore_write_reg(wl, REG_INTERRUPT_MASK,
813 WL1271_ACX_INTR_ALL & ~intr_mask); 813 WL1271_ACX_INTR_ALL & ~intr_mask);
814 if (ret < 0)
815 goto disable_interrupts;
816
817 return ret;
818
819disable_interrupts:
820 wlcore_disable_interrupts(wl);
814 821
815out: 822out:
816 return ret; 823 return ret;