Re: [PATCH] thermal: Fix potential NULL pointer accesses

2012-08-09 Thread Zhang Rui
On 三, 2012-08-08 at 23:25 -0700, Guenter Roeck wrote: > On Thu, Aug 09, 2012 at 08:44:55AM +0800, Zhang Rui wrote: > > On 二, 2012-08-07 at 22:36 -0700, Guenter Roeck wrote: > > > The type parameter in thermal_zone_device_register and > > > thermal_cooling_device_register can be NULL, indicating

Re: [PATCH] thermal: Fix potential NULL pointer accesses

2012-08-09 Thread Guenter Roeck
On Thu, Aug 09, 2012 at 08:44:55AM +0800, Zhang Rui wrote: > On 二, 2012-08-07 at 22:36 -0700, Guenter Roeck wrote: > > The type parameter in thermal_zone_device_register and > > thermal_cooling_device_register can be NULL, indicating that no sysfs > > attribute > > for the type should be created.

Re: [PATCH] thermal: Fix potential NULL pointer accesses

2012-08-09 Thread Guenter Roeck
On Thu, Aug 09, 2012 at 08:44:55AM +0800, Zhang Rui wrote: On 二, 2012-08-07 at 22:36 -0700, Guenter Roeck wrote: The type parameter in thermal_zone_device_register and thermal_cooling_device_register can be NULL, indicating that no sysfs attribute for the type should be created. Only

Re: [PATCH] thermal: Fix potential NULL pointer accesses

2012-08-09 Thread Zhang Rui
On 三, 2012-08-08 at 23:25 -0700, Guenter Roeck wrote: On Thu, Aug 09, 2012 at 08:44:55AM +0800, Zhang Rui wrote: On 二, 2012-08-07 at 22:36 -0700, Guenter Roeck wrote: The type parameter in thermal_zone_device_register and thermal_cooling_device_register can be NULL, indicating that no

Re: [PATCH] thermal: Fix potential NULL pointer accesses

2012-08-08 Thread Zhang Rui
On 二, 2012-08-07 at 22:36 -0700, Guenter Roeck wrote: > The type parameter in thermal_zone_device_register and > thermal_cooling_device_register can be NULL, indicating that no sysfs > attribute > for the type should be created. Only call strlen() and strcpy() on type if it > is > not NULL. > >

Re: [PATCH] thermal: Fix potential NULL pointer accesses

2012-08-08 Thread Zhang Rui
On 二, 2012-08-07 at 22:36 -0700, Guenter Roeck wrote: The type parameter in thermal_zone_device_register and thermal_cooling_device_register can be NULL, indicating that no sysfs attribute for the type should be created. Only call strlen() and strcpy() on type if it is not NULL. This

[PATCH] thermal: Fix potential NULL pointer accesses

2012-08-07 Thread Guenter Roeck
The type parameter in thermal_zone_device_register and thermal_cooling_device_register can be NULL, indicating that no sysfs attribute for the type should be created. Only call strlen() and strcpy() on type if it is not NULL. This patch addresses Coverity #102180 and #102182: Dereference before

[PATCH] thermal: Fix potential NULL pointer accesses

2012-08-07 Thread Guenter Roeck
The type parameter in thermal_zone_device_register and thermal_cooling_device_register can be NULL, indicating that no sysfs attribute for the type should be created. Only call strlen() and strcpy() on type if it is not NULL. This patch addresses Coverity #102180 and #102182: Dereference before