All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@nokia.com>
To: linux-main <linux-kernel@vger.kernel.org>
Cc: Kalle Jokiniemi <kalle.jokiniemi@nokia.com>,
	Heikki Krogerus <heikki.krogerus@nokia.com>,
	Anton Vorontsov <cbouatmailru@gmail.com>,
	Tony Lindgren <tony@atomide.com>,
	Felipe Contreras <felipe.contreras@gmail.com>
Subject: [PATCH 1/2] isp1704_charger: fix missing check
Date: Mon,  5 Dec 2011 19:23:39 +0200	[thread overview]
Message-ID: <1323105820-25946-2-git-send-email-felipe.contreras@nokia.com> (raw)
In-Reply-To: <1323105820-25946-1-git-send-email-felipe.contreras@nokia.com>

From: Felipe Contreras <felipe.contreras@gmail.com>

A segfault happens if there's no board information.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.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


  reply	other threads:[~2011-12-05 17:24 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-05 17:23 [PATCH 0/2] omap: rx51: fix USB networking Felipe Contreras
2011-12-05 17:23 ` Felipe Contreras [this message]
2011-12-08 14:42   ` [PATCH 1/2] isp1704_charger: fix missing check Heikki Krogerus
2012-01-06  2:02     ` Anton Vorontsov
2011-12-05 17:23 ` [PATCH 2/2] Revert "ARM: RX-51: Enable isp1704 power on/off" Felipe Contreras
2011-12-05 17:31   ` Felipe Contreras
2011-12-07 11:46     ` Jarkko Nikula
2011-12-07 18:42       ` Felipe Contreras
2011-12-12  7:09         ` Jarkko Nikula
2011-12-13 21:19           ` Felipe Contreras
2011-12-13 22:53             ` Felipe Balbi
2011-12-13 23:02               ` Felipe Contreras
2011-12-14  7:30                 ` Felipe Balbi
2011-12-14 19:31                   ` Felipe Contreras
2011-12-07  7:14   ` kalle.jokiniemi
2011-12-07 10:57     ` Felipe Contreras
2011-12-07 13:05   ` Heikki Krogerus
2011-12-07 18:43     ` Felipe Contreras
2011-12-07 19:31       ` Tony Lindgren
2011-12-07 19:56         ` [PATCH] omap: rx51: initialize isp1704 properly Felipe Contreras
2011-12-07 19:56           ` Felipe Contreras
2011-12-08 14:40           ` Heikki Krogerus
2011-12-08 14:40             ` Heikki Krogerus
2011-12-08 20:23             ` [PATCH v2] omap: rx51: fix USB Felipe Contreras
2011-12-08 20:23               ` Felipe Contreras
2011-12-10  8:37               ` Sebastian Reichel
2011-12-10  8:37                 ` Sebastian Reichel
2011-12-08 20:23             ` [PATCH] omap: rx51: initialize isp1704 properly Felipe Contreras
2011-12-08 20:23               ` Felipe Contreras
2011-12-12 19:44               ` Tony Lindgren
2011-12-12 19:44                 ` Tony Lindgren
2011-12-13 20:00                 ` Sebastian Reichel
2011-12-13 20:00                   ` Sebastian Reichel
2011-12-13 20:05                 ` Felipe Contreras
2011-12-13 20:05                   ` Felipe Contreras
2011-12-13 21:55                   ` Tony Lindgren
2011-12-13 21:55                     ` Tony Lindgren
2011-12-08 14:13         ` [PATCH 2/2] Revert "ARM: RX-51: Enable isp1704 power on/off" Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1323105820-25946-2-git-send-email-felipe.contreras@nokia.com \
    --to=felipe.contreras@nokia.com \
    --cc=cbouatmailru@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=heikki.krogerus@nokia.com \
    --cc=kalle.jokiniemi@nokia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.