From: Guenter Roeck <linux@roeck-us.net>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: Jean Delvare <khali@linux-fr.org>,
lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org
Subject: Re: NULL dereference BUG in sch56xx_init()
Date: Thu, 9 Aug 2012 07:42:39 -0700 [thread overview]
Message-ID: <20120809144239.GA6604@roeck-us.net> (raw)
In-Reply-To: <20120809125526.GA11926@localhost>
On Thu, Aug 09, 2012 at 08:55:26PM +0800, Fengguang Wu wrote:
> Hi Guenter,
>
> This commit triggered an oops which can be fixed by the attached diff.
> Should it be folded into the original one (preferable for me), or be
> resent as a standalone patch?
>
I folded it into the original commit.
Thanks a lot for the test and feedback!
Guenter
[ ... ]
> diff --git a/drivers/hwmon/sch56xx-common.c b/drivers/hwmon/sch56xx-common.c
> index 69abbf7..d00b30a 100644
> --- a/drivers/hwmon/sch56xx-common.c
> +++ b/drivers/hwmon/sch56xx-common.c
> @@ -554,7 +554,7 @@ exit:
> return err;
> }
>
> -static int __init sch56xx_device_add(unsigned short address, const char *name)
> +static int __init sch56xx_device_add(int address, const char *name)
> {
> struct resource res = {
> .start = address,
> @@ -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);
next prev parent reply other threads:[~2012-08-09 14:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-09 12:55 Fengguang Wu
2012-08-09 14:42 ` Guenter Roeck [this message]
2012-08-10 8:35 ` [lm-sensors] " Hans de Goede
2012-08-10 15:48 ` Guenter Roeck
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=20120809144239.GA6604@roeck-us.net \
--to=linux@roeck-us.net \
--cc=fengguang.wu@intel.com \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.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
Powered by JetHome