Re: NULL dereference BUG in sch56xx_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);


_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux