Skip to contentSkip to conversation

wireless: wlcore: spi: remove unnecessary variable

PATCH In review Gustavo A. R. Silva 2 participants 3 messages Jun 9, 2017 – Jun 13, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wireless: wlcore: spi: remove unnecessary variable

Remove unnecessary variable and refactor the code.

Addresses-Coverity-ID: 1365000

---
 drivers/net/wireless/ti/wlcore/spi.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/net/wireless/ti/wlcore/spi.c +2 -5
index fa3547e..d2d899a 100644
@@ -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);
 }
 
 /**
Signature · 1 line
2.5.0
#2 lore raw

Re: wlcore: spi: remove unnecessary variable

In reply to Gustavo A. R. Silva
Quoted 4 lines · Gustavo A. R. Silva

Remove unnecessary variable and refactor the code.

Addresses-Coverity-ID: 1365000

Patch applied to wireless-drivers-next.git, thanks.

c48c281e7236 wlcore: spi: remove unnecessary variable

Signature · 3 lines
https://patchwork.kernel.org/patch/9777073/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches