From: Jean Delvare <jdelvare@suse.de>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Hardware Monitoring <linux-hwmon@vger.kernel.org>
Subject: Re: [PATCH] hwmon: (lm90) Add missing assignment
Date: Tue, 26 Jul 2016 09:21:22 +0200 [thread overview]
Message-ID: <20160726092122.64674f04@endymion> (raw)
In-Reply-To: <1469483441-10702-1-git-send-email-linux@roeck-us.net>
Hi Guenter,
On Mon, 25 Jul 2016 14:50:41 -0700, Guenter Roeck wrote:
> Coverity reports the following error.
>
> >>> CID 1364474: Error handling issues (CHECKED_RETURN)
> >>> Calling "lm90_read_reg" without checking return value (as is done
> >>> elsewhere 28 out of 29 times).
> 532 lm90_read_reg(client, LM90_REG_R_REMOTE_LOWH);
> 533 if (val < 0)
> 534 return val;
>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/hwmon/lm90.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
> index f51e758ba529..7b3eedf76c62 100644
> --- a/drivers/hwmon/lm90.c
> +++ b/drivers/hwmon/lm90.c
> @@ -529,7 +529,7 @@ static int lm90_update_limits(struct device *dev)
> return val;
> data->temp_hyst = val;
>
> - lm90_read_reg(client, LM90_REG_R_REMOTE_LOWH);
> + val = lm90_read_reg(client, LM90_REG_R_REMOTE_LOWH);
> if (val < 0)
> return val;
> data->temp11[REMOTE_LOW] = val << 8;
Good catch.
Reviewed-by: Jean Delvare <jdelvare@suse.de>
--
Jean Delvare
SUSE L3 Support
prev parent reply other threads:[~2016-07-26 7:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-25 21:50 [PATCH] hwmon: (lm90) Add missing assignment Guenter Roeck
2016-07-26 7:21 ` Jean Delvare [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=20160726092122.64674f04@endymion \
--to=jdelvare@suse.de \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
/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