Re: [PATCH] hwmon: (coretemp) Fix oops on driver load

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

 



Thanks Jean for the fix.

> If the CPU microcode is too old, the coretemp driver won't work. But
> instead of failing gracefully, it currently oops. Check for NULL
> platform device data to avoid this.

Acked-by: Durgadoss R <durgadoss.r@xxxxxxxxx>

Thanks,
Durga

> Signed-off-by: Jean Delvare <khali@xxxxxxxxxxxx>
> Cc: Fenghua Yu <fenghua.yu@xxxxxxxxx>
> Cc: Durgadoss R <Durgadoss.r@xxxxxxxxx>
> Cc: Guenter Roeck <guenter.roeck@xxxxxxxxxxxx>
> ---
> This is for stable kernel branch 3.0 only. Previous and later versions
> have different code paths and are not affected by this bug.
> 
>  drivers/hwmon/coretemp.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- linux-3.0.orig/drivers/hwmon/coretemp.c	2011-12-01 08:39:45.000000000
> +0100
> +++ linux-3.0/drivers/hwmon/coretemp.c	2011-12-01 08:49:32.000000000 +0100
> @@ -539,6 +539,8 @@ static void coretemp_add_core(unsigned i
>  		return;
> 
>  	pdata = platform_get_drvdata(pdev);
> +	if (!pdata)
> +		return;
> 
>  	err = create_core_data(pdata, pdev, cpu, pkg_flag);
>  	if (err)
> 
> --
> Jean Delvare

_______________________________________________
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