Commit c48c281e authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Kalle Valo

wlcore: spi: remove unnecessary variable

Remove unnecessary variable and refactor the code.

Addresses-Coverity-ID: 1365000
Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 078b30da
...@@ -366,17 +366,14 @@ static int __wl12xx_spi_raw_write(struct device *child, int addr, ...@@ -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, static int __must_check wl12xx_spi_raw_write(struct device *child, int addr,
void *buf, size_t len, bool fixed) void *buf, size_t len, bool fixed)
{ {
int ret;
/* The ELP wakeup write may fail the first time due to internal /* The ELP wakeup write may fail the first time due to internal
* hardware latency. It is safer to send the wakeup command twice to * hardware latency. It is safer to send the wakeup command twice to
* avoid unexpected failures. * avoid unexpected failures.
*/ */
if (addr == HW_ACCESS_ELP_CTRL_REG) if (addr == HW_ACCESS_ELP_CTRL_REG)
ret = __wl12xx_spi_raw_write(child, addr, buf, len, fixed); __wl12xx_spi_raw_write(child, addr, buf, len, fixed);
ret = __wl12xx_spi_raw_write(child, addr, buf, len, fixed);
return ret; return __wl12xx_spi_raw_write(child, addr, buf, len, fixed);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment