Commit c934502d authored by Felipe Contreras's avatar Felipe Contreras Committed by Anton Vorontsov

isp1704_charger: Fix missing check

A segfault happens if there's no board information.
Signed-off-by: default avatarFelipe Contreras <felipe.contreras@gmail.com>
Acked-by: default avatarHeikki Krogerus <krohei@gmail.com>
Signed-off-by: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
parent ef7906f3
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment