[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87zhlfprdh.fsf@codeaurora.org>
Date: Mon, 15 Jul 2019 12:40:58 +0300
From: Kalle Valo <kvalo@...eaurora.org>
To: Colin King <colin.king@...onical.com>
Cc: "David S . Miller" <davem@...emloft.net>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] wl3501_cs: remove redundant variable ret
Colin King <colin.king@...onical.com> writes:
> From: Colin Ian King <colin.king@...onical.com>
>
> The variable ret is being initialized with a value that is never
> read and it is being updated later with a new value that is returned.
> The variable is redundant and can be replaced with a return 0 as
> there are no other return points in this function.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
> drivers/net/wireless/wl3501_cs.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
> index a25b17932edb..007bf6803293 100644
> --- a/drivers/net/wireless/wl3501_cs.c
> +++ b/drivers/net/wireless/wl3501_cs.c
> @@ -1226,7 +1226,6 @@ static int wl3501_init_firmware(struct wl3501_card *this)
> static int wl3501_close(struct net_device *dev)
> {
> struct wl3501_card *this = netdev_priv(dev);
> - int rc = -ENODEV;
I'll manually fix the commit log with:
s/variable ret/variable rc/
--
Kalle Valo
Powered by blists - more mailing lists