mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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:
parent
ef7906f320
commit
c934502db7
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue