2020-04-13 12:26:21

by Jason Yan

[permalink] [raw]
Subject: [PATCH] orinoco: remove useless variable 'err' in spectrum_cs_suspend()

Fix the following coccicheck warning:

drivers/net/wireless/intersil/orinoco/spectrum_cs.c:281:5-8: Unneeded
variable: "err". Return "0" on line 286

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Jason Yan <[email protected]>
---
drivers/net/wireless/intersil/orinoco/spectrum_cs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intersil/orinoco/spectrum_cs.c b/drivers/net/wireless/intersil/orinoco/spectrum_cs.c
index b60048c95e0a..291ef97ed45e 100644
--- a/drivers/net/wireless/intersil/orinoco/spectrum_cs.c
+++ b/drivers/net/wireless/intersil/orinoco/spectrum_cs.c
@@ -278,12 +278,11 @@ static int
spectrum_cs_suspend(struct pcmcia_device *link)
{
struct orinoco_private *priv = link->priv;
- int err = 0;

/* Mark the device as stopped, to block IO until later */
orinoco_down(priv);

- return err;
+ return 0;
}

static int
--
2.21.1


2020-04-15 22:40:52

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] orinoco: remove useless variable 'err' in spectrum_cs_suspend()

Jason Yan <[email protected]> wrote:

> Fix the following coccicheck warning:
>
> drivers/net/wireless/intersil/orinoco/spectrum_cs.c:281:5-8: Unneeded
> variable: "err". Return "0" on line 286
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Jason Yan <[email protected]>

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

7b9ae69d5441 orinoco: remove useless variable 'err' in spectrum_cs_suspend()

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

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