From: Guenter Roeck <linux@roeck-us.net>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch] hwmon: (sch56xx-common) signedness bug in sch56xx_init()
Date: Fri, 10 Aug 2012 18:44:32 +0000 [thread overview]
Message-ID: <20120810184432.GB4625@roeck-us.net> (raw)
In-Reply-To: <20120810092412.GB26875@elgon.mountain>
On Fri, Aug 10, 2012 at 12:24:13PM +0300, Dan Carpenter wrote:
> "address" is used to store an unsigned short on success but a negative
> error code on failure. It needs to be an int for the error handling to
> work.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Patch merged into the original patch which introduced the problem.
Thanks,
Guenter
> ---
> This is for linux-next. The bug was introduced in 1645e4fc "hwmon:
> (sch56xx-common) Fix build warnings"
>
> diff --git a/drivers/hwmon/sch56xx-common.c b/drivers/hwmon/sch56xx-common.c
> index 69abbf7..c93061f5 100644
> --- a/drivers/hwmon/sch56xx-common.c
> +++ b/drivers/hwmon/sch56xx-common.c
> @@ -594,7 +594,7 @@ exit_device_put:
>
> static int __init sch56xx_init(void)
> {
> - unsigned short address;
> + int address;
> const char *name = NULL;
>
> address = sch56xx_find(0x4e, &name);
>
prev parent reply other threads:[~2012-08-10 18:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-10 9:24 [patch] hwmon: (sch56xx-common) signedness bug in sch56xx_init() Dan Carpenter
2012-08-10 18:44 ` 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=20120810184432.GB4625@roeck-us.net \
--to=linux@roeck-us.net \
--cc=kernel-janitors@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