Re: [PATCH] power: max17040: Fix NULL pointer dereference when there is no platform_data

2014-02-01 Thread Dmitry Eremin-Solenikov
Hello, On Thu, Jan 30, 2014 at 5:32 PM, Krzysztof Kozlowski wrote: > Fix NULL pointer dereference of "chip->pdata" if platform_data was not > supplied to the driver. > > The driver during probe stored the pointer to the platform_data: > chip->pdata = client->dev.platform_data; > Later it

[PATCH] power: max17040: Fix NULL pointer dereference when there is no platform_data

2014-01-30 Thread Krzysztof Kozlowski
Fix NULL pointer dereference of "chip->pdata" if platform_data was not supplied to the driver. The driver during probe stored the pointer to the platform_data: chip->pdata = client->dev.platform_data; Later it was dereferenced in max17040_get_online() and max17040_get_status(). If platfor