* [PATCH] staging: net: wimax: i2400m: fw: remove redundant initialization of variable result
@ 2021-01-28 17:37 Colin King
2021-01-28 20:51 ` Joe Perches
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-01-28 17:37 UTC (permalink / raw)
To: Greg Kroah-Hartman, Lee Jones, devel; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable result is being initialized with a value that is never
read and it is being updated later with a new value. The initialization
is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/staging/wimax/i2400m/fw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/wimax/i2400m/fw.c b/drivers/staging/wimax/i2400m/fw.c
index edb5eba0898b..b2fd4bd2c5f9 100644
--- a/drivers/staging/wimax/i2400m/fw.c
+++ b/drivers/staging/wimax/i2400m/fw.c
@@ -583,7 +583,7 @@ ssize_t i2400m_bm_cmd(struct i2400m *i2400m,
struct i2400m_bootrom_header *ack, size_t ack_size,
int flags)
{
- ssize_t result = -ENOMEM, rx_bytes;
+ ssize_t result, rx_bytes;
struct device *dev = i2400m_dev(i2400m);
int opcode = cmd == NULL ? -1 : i2400m_brh_get_opcode(cmd);
--
2.29.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: net: wimax: i2400m: fw: remove redundant initialization of variable result
2021-01-28 17:37 [PATCH] staging: net: wimax: i2400m: fw: remove redundant initialization of variable result Colin King
@ 2021-01-28 20:51 ` Joe Perches
0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2021-01-28 20:51 UTC (permalink / raw)
To: Colin King, Greg Kroah-Hartman, Lee Jones, devel
Cc: kernel-janitors, linux-kernel
On Thu, 2021-01-28 at 17:37 +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable result is being initialized with a value that is never
> read and it is being updated later with a new value. The initialization
> is redundant and can be removed.
Isn't WIMAX dead? Shouldn't it be marked ORPHAN in MAINTAINERS?
---
diff --git a/MAINTAINERS b/MAINTAINERS
index caac09a3c5c9..922afd393cb6 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19201,6 +19201,10 @@ S: Supported
W: https://wireless.wiki.kernel.org/en/users/Drivers/wil6210
F: drivers/net/wireless/ath/wil6210/
+WIMAX
+S: Orphan
+F: drivers/staging/wimax/
+
WINBOND CIR DRIVER
M: David Härdeman <david@hardeman.nu>
S: Maintained
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-28 20:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28 17:37 [PATCH] staging: net: wimax: i2400m: fw: remove redundant initialization of variable result Colin King
2021-01-28 20:51 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).