diff options
author | Gustavo A. R. Silva <garsilva@embeddedor.com> | 2017-06-08 22:24:30 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-06-13 10:06:22 +0300 |
commit | c48c281e7236fc8769dd62e6b13ba090a546027d (patch) | |
tree | e9b4f969232f98771235ad951bec77ccaca04eb7 /drivers/net/wireless | |
parent | 078b30da3f074f2e9ebcf1a18e993b27e22eb3ba (diff) |
wlcore: spi: remove unnecessary variable
Remove unnecessary variable and refactor the code.
Addresses-Coverity-ID: 1365000
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ti/wlcore/spi.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c index 698bfa99cfa2..fdabb9242cca 100644 --- a/drivers/net/wireless/ti/wlcore/spi.c +++ b/drivers/net/wireless/ti/wlcore/spi.c @@ -366,17 +366,14 @@ static int __wl12xx_spi_raw_write(struct device *child, int addr, static int __must_check wl12xx_spi_raw_write(struct device *child, int addr, void *buf, size_t len, bool fixed) { - int ret; - /* The ELP wakeup write may fail the first time due to internal * hardware latency. It is safer to send the wakeup command twice to * avoid unexpected failures. */ if (addr == HW_ACCESS_ELP_CTRL_REG) - ret = __wl12xx_spi_raw_write(child, addr, buf, len, fixed); - ret = __wl12xx_spi_raw_write(child, addr, buf, len, fixed); + __wl12xx_spi_raw_write(child, addr, buf, len, fixed); - return ret; + return __wl12xx_spi_raw_write(child, addr, buf, len, fixed); } /** |