[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1323105820-25946-2-git-send-email-felipe.contreras@nokia.com>
Date: Mon, 5 Dec 2011 19:23:39 +0200
From: Felipe Contreras <felipe.contreras@...ia.com>
To: linux-main <linux-kernel@...r.kernel.org>
Cc: Kalle Jokiniemi <kalle.jokiniemi@...ia.com>,
Heikki Krogerus <heikki.krogerus@...ia.com>,
Anton Vorontsov <cbouatmailru@...il.com>,
Tony Lindgren <tony@...mide.com>,
Felipe Contreras <felipe.contreras@...il.com>
Subject: [PATCH 1/2] isp1704_charger: fix missing check
From: Felipe Contreras <felipe.contreras@...il.com>
A segfault happens if there's no board information.
Signed-off-by: Felipe Contreras <felipe.contreras@...il.com>
---
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 f6d72b4..768cf5e 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)
{
struct isp1704_charger_data *board = isp->dev->platform_data;
- if (board->set_power)
+ if (board && board->set_power)
board->set_power(on);
}
--
1.7.8.rc3.17.gf56ef1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists