2019-07-26 10:07:18

by Colin King

[permalink] [raw]
Subject: [PATCH] ipw2x00: remove redundant assignment to err

From: Colin Ian King <[email protected]>

Variable err is initialized to a value that is never read and it
is re-assigned later. The initialization is redundant and can
be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <[email protected]>
---
drivers/net/wireless/intel/ipw2x00/ipw2100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
index 75c0c29d81f0..8dfbaff2d1fe 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
@@ -4413,7 +4413,7 @@ static void ipw2100_kill_works(struct ipw2100_priv *priv)

static int ipw2100_tx_allocate(struct ipw2100_priv *priv)
{
- int i, j, err = -EINVAL;
+ int i, j, err;
void *v;
dma_addr_t p;

--
2.20.1



2019-07-26 19:26:50

by Stanislav Yakovlev

[permalink] [raw]
Subject: Re: [PATCH] ipw2x00: remove redundant assignment to err

On 26/07/2019, Colin King <[email protected]> wrote:
> From: Colin Ian King <[email protected]>
>
> Variable err is initialized to a value that is never read and it
> is re-assigned later. The initialization is redundant and can
> be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <[email protected]>
> ---
> drivers/net/wireless/intel/ipw2x00/ipw2100.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Looks fine, thanks!

Stanislav.

2019-08-06 12:38:27

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] ipw2x00: remove redundant assignment to err

Colin King <[email protected]> wrote:

> From: Colin Ian King <[email protected]>
>
> Variable err is initialized to a value that is never read and it
> is re-assigned later. The initialization is redundant and can
> be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <[email protected]>

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

937a194ae865 ipw2x00: remove redundant assignment to err

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

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