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: NMilo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
Showing
想要评论请 注册 或 登录