diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2012-01-05 21:00:48 -0500 |
---|---|---|
committer | Anton Vorontsov <cbouatmailru@gmail.com> | 2012-01-05 21:01:58 -0500 |
commit | c934502db7fda4fac1bb3b5c74f35e9bde8e7547 (patch) | |
tree | 8acd156ec2a736cb309d79e0d82c4707c1964934 /drivers/power/isp1704_charger.c | |
parent | ef7906f3204280ccaf8cd7ace974b7c0a1393812 (diff) |
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>
Diffstat (limited to 'drivers/power/isp1704_charger.c')
-rw-r--r-- | drivers/power/isp1704_charger.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/isp1704_charger.c b/drivers/power/isp1704_charger.c index 6a4ef387a183..b806667b59ae 100644 --- a/drivers/power/isp1704_charger.c +++ b/drivers/power/isp1704_charger.c | |||
@@ -79,7 +79,7 @@ static void isp1704_charger_set_power(struct isp1704_charger *isp, bool on) | |||
79 | { | 79 | { |
80 | struct isp1704_charger_data *board = isp->dev->platform_data; | 80 | struct isp1704_charger_data *board = isp->dev->platform_data; |
81 | 81 | ||
82 | if (board->set_power) | 82 | if (board && board->set_power) |
83 | board->set_power(on); | 83 | board->set_power(on); |
84 | } | 84 | } |
85 | 85 | ||