forked from luck/tmp_suning_uos_patched
isp1704_charger: Fix missing check
A segfault happens if there's no board information. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Acked-by: Heikki Krogerus <krohei@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
This commit is contained in:
parent
ef7906f320
commit
c934502db7
|
@ -79,7 +79,7 @@ static void isp1704_charger_set_power(struct isp1704_charger *isp, bool on)
|
|||
{
|
||||
struct isp1704_charger_data *board = isp->dev->platform_data;
|
||||
|
||||
if (board->set_power)
|
||||
if (board && board->set_power)
|
||||
board->set_power(on);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user