From: Guenter Roeck <linux@roeck-us.net>
To: Colin King <colin.king@canonical.com>
Cc: Jean Delvare <jdelvare@suse.com>,
linux-hwmon@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon: i5k_amb: remove redundant assignment to variable res
Date: Wed, 10 Jun 2020 06:25:01 -0700 [thread overview]
Message-ID: <20200610132501.GA112976@roeck-us.net> (raw)
In-Reply-To: <20200610123638.1133428-1-colin.king@canonical.com>
On Wed, Jun 10, 2020 at 01:36:38PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable res 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>
Applied.
Thanks,
Guenter
> ---
> drivers/hwmon/i5k_amb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/i5k_amb.c b/drivers/hwmon/i5k_amb.c
> index eeac4b04df27..cd5b62905eee 100644
> --- a/drivers/hwmon/i5k_amb.c
> +++ b/drivers/hwmon/i5k_amb.c
> @@ -396,7 +396,7 @@ static int i5k_amb_hwmon_init(struct platform_device *pdev)
>
> static int i5k_amb_add(void)
> {
> - int res = -ENODEV;
> + int res;
>
> /* only ever going to be one of these */
> amb_pdev = platform_device_alloc(DRVNAME, 0);
prev parent reply other threads:[~2020-06-10 13:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-10 12:36 Colin King
2020-06-10 13:25 ` Guenter Roeck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200610132501.GA112976@roeck-us.net \
--to=linux@roeck-us.net \
--cc=colin.king@canonical.com \
--cc=jdelvare@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®