summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti
diff options
context:
space:
mode:
authorGustavo A. R. Silva <garsilva@embeddedor.com>2017-06-27 02:06:19 +0300
committerKalle Valo <kvalo@codeaurora.org>2017-06-28 21:18:40 +0300
commit059c98599b1ab1e2e479e1f4617948d4c2a32b84 (patch)
tree2d3a077593c9bbb6397e0b7d23eaeaf92b61d223 /drivers/net/wireless/ti
parent69551f5f370cc20342fab17ca54716b6ec7e332d (diff)
downloadlinux-059c98599b1ab1e2e479e1f4617948d4c2a32b84.tar.xz
wl18xx: add checks on wl18xx_top_reg_write() return value
Check return value from call to wl18xx_top_reg_write(), so in case of error jump to goto label out and return. Also, remove unnecessary value check before goto label out. Addresses-Coverity-ID: 1226938 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ti')
-rw-r--r--drivers/net/wireless/ti/wl18xx/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c
index d1aa3eee0e81..0cf3b4013dd6 100644
--- a/drivers/net/wireless/ti/wl18xx/main.c
+++ b/drivers/net/wireless/ti/wl18xx/main.c
@@ -793,9 +793,13 @@ static int wl18xx_set_clk(struct wl1271 *wl)
ret = wl18xx_top_reg_write(wl, PLLSH_WCS_PLL_P_FACTOR_CFG_2,
(wl18xx_clk_table[clk_freq].p >> 16) &
PLLSH_WCS_PLL_P_FACTOR_CFG_2_MASK);
+ if (ret < 0)
+ goto out;
} else {
ret = wl18xx_top_reg_write(wl, PLLSH_WCS_PLL_SWALLOW_EN,
PLLSH_WCS_PLL_SWALLOW_EN_VAL2);
+ if (ret < 0)
+ goto out;
}
/* choose WCS PLL */
@@ -819,8 +823,6 @@ static int wl18xx_set_clk(struct wl1271 *wl)
/* reset the swallowing logic */
ret = wl18xx_top_reg_write(wl, PLLSH_COEX_PLL_SWALLOW_EN,
PLLSH_COEX_PLL_SWALLOW_EN_VAL2);
- if (ret < 0)
- goto out;
out:
return ret;