[PATCH] rsi: rsi_91x_ps: remove redundant code in str_psstate

Subsystems: redpine wireless driver, the rest

STALE3233d

2 messages, 2 authors, 2017-11-10 · open the first message on its own page

[PATCH] rsi: rsi_91x_ps: remove redundant code in str_psstate

From: Gustavo A. R. Silva <hidden>
Date: 2017-11-06 21:53:25

"INVALID_STATE" is already being returned in the default case and this
code cannot be reached.

Addresses-Coverity-ID: 1398384
Signed-off-by: Gustavo A. R. Silva <redacted>
---
 drivers/net/wireless/rsi/rsi_91x_ps.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_ps.c b/drivers/net/wireless/rsi/rsi_91x_ps.c
index 523f532..01472fa 100644
--- a/drivers/net/wireless/rsi/rsi_91x_ps.c
+++ b/drivers/net/wireless/rsi/rsi_91x_ps.c
@@ -36,7 +36,6 @@ char *str_psstate(enum ps_state state)
 	default:
 		return "INVALID_STATE";
 	}
-	return "INVALID_STATE";
 }
 
 static inline void rsi_modify_ps_state(struct rsi_hw *adapter,
-- 
2.7.4

Re: rsi: rsi_91x_ps: remove redundant code in str_psstate

From: Kalle Valo <hidden>
Date: 2017-11-10 02:36:58

"Gustavo A. R. Silva" [off-list ref] wrote:
"INVALID_STATE" is already being returned in the default case and this
code cannot be reached.

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

4775ae7afec6 rsi: rsi_91x_ps: remove redundant code in str_psstate

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

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