isp1704_charger: Fix missing check

A segfault happens if there's no board information.

Signed-off-by: Felipe Contreras <[email protected]>
Acked-by: Heikki Krogerus <[email protected]>
Signed-off-by: Anton Vorontsov <[email protected]>
This commit is contained in:
Felipe Contreras 2012-01-06 06:00:48 +04:00 • committed by Anton Vorontsov
commit c934502db7

View file

@ -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);
}