]> git.baikalelectronics.ru Git - kernel.git/commit
lp8727_charger: Fix buggy code of NULL pdata
authorKim, Milo <Milo.Kim@ti.com>
Fri, 31 Aug 2012 09:23:12 +0000 (09:23 +0000)
committerAnton Vorontsov <anton.vorontsov@linaro.org>
Fri, 21 Sep 2012 00:56:49 +0000 (17:56 -0700)
commit4fa12f11a0a4e1cabb8b5b4cbef0ad87cb62490d
treea1d4c51931e22d78abcf5a7b0217e6b5a73c589d
parentcca4ee554bfc3cf375c6ff44bfd77fbac7dea619
lp8727_charger: Fix buggy code of NULL pdata

LP8727 platform data is optional, so the driver should work even the
platform data is NULL.

To check the platform data, charging parameter data should be changed to
the pointer type.

Fix NULL point access problem when getting the battery properties. When
the data is NULL, just return as invalid value.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
drivers/power/lp8727_charger.c
include/linux/platform_data/lp8727.h