From: Minkyu Kang <mk7.kang@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] universal_c210: check the NULL pointer when get the PMIC
Date: Tue, 11 Dec 2012 12:58:55 +0900 [thread overview]
Message-ID: <50C6AF7F.40607@samsung.com> (raw)
In-Reply-To: <50C5E8B5.3080805@samsung.com>
PMIC 2.0 require to test return pointer from pmic_get()
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Wolfgang Denk <wd@denx.de>
---
Changes in V2:
- Since functions are void type, remove the return value.
board/samsung/universal_c210/universal.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c
index 4869798..e742707 100644
--- a/board/samsung/universal_c210/universal.c
+++ b/board/samsung/universal_c210/universal.c
@@ -343,6 +343,9 @@ static void init_pmic_lcd(void)
struct pmic *p = pmic_get("MAX8998_PMIC");
+ if (!p)
+ return;
+
if (pmic_probe(p))
return;
@@ -434,6 +437,9 @@ static void lcd_power_on(void)
{
struct pmic *p = pmic_get("MAX8998_PMIC");
+ if (!p)
+ return;
+
if (pmic_probe(p))
return;
--
1.7.9.5
next prev parent reply other threads:[~2012-12-11 3:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-10 13:50 [U-Boot] [PATCH] universal_c210: check the NULL pointer when get the PMIC Minkyu Kang
2012-12-11 3:58 ` Minkyu Kang [this message]
2012-12-11 7:57 ` [U-Boot] [PATCH v2] " Lukasz Majewski
2012-12-11 10:49 ` Minkyu Kang
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=50C6AF7F.40607@samsung.com \
--to=mk7.kang@samsung.com \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox