[PATCH] wireless: wlcore: spi: remove unnecessary variable

Subsystems: the rest, ti wilink wireless drivers

STALE3412d

2 messages, 2 authors, 2017-06-13 · open the first message on its own page

[PATCH] wireless: wlcore: spi: remove unnecessary variable

From: Gustavo A. R. Silva <hidden>
Date: 2017-06-09 03:24:37

Remove unnecessary variable and refactor the code.

Addresses-Coverity-ID: 1365000
Signed-off-by: Gustavo A. R. Silva <redacted>
---
 drivers/net/wireless/ti/wlcore/spi.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c
index fa3547e..d2d899a 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);
 }
 
 /**
-- 
2.5.0

Re: wlcore: spi: remove unnecessary variable

From: Kalle Valo <hidden>
Date: 2017-06-13 07:07:13

"Gustavo A. R. Silva" [off-list ref] wrote:
Remove unnecessary variable and refactor the code.

Addresses-Coverity-ID: 1365000
Signed-off-by: Gustavo A. R. Silva <redacted>
Patch applied to wireless-drivers-next.git, thanks.

c48c281e7236 wlcore: spi: remove unnecessary variable

-- 
https://patchwork.kernel.org/patch/9777073/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help