提交 c934502d 编写于 作者: F Felipe Contreras 提交者: Anton Vorontsov

isp1704_charger: Fix missing check

A segfault happens if there's no board information.
Signed-off-by: NFelipe Contreras <felipe.contreras@gmail.com>
Acked-by: NHeikki Krogerus <krohei@gmail.com>
Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册