Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Felipe Contreras and committed by
Anton Vorontsov
c934502d ef7906f3

+1 -1
+1 -1
drivers/power/isp1704_charger.c
··· 79 79 { 80 80 struct isp1704_charger_data *board = isp->dev->platform_data; 81 81 82 - if (board->set_power) 82 + if (board && board->set_power) 83 83 board->set_power(on); 84 84 } 85 85