summaryrefslogtreecommitdiffstats
path: root/board/samsung/universal_c210
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2012-12-10 22:43:57 +0900
committerMinkyu Kang <mk7.kang@samsung.com>2012-12-11 17:37:28 +0900
commitfbef8e6e7f1233ed20f8c5045e12c9cf31b43540 (patch)
treea7ca3a4084d7e250d0c159f4c3c81977091ad948 /board/samsung/universal_c210
parent211e8438cf61df1e2a53b6b979a8e4224158d5dc (diff)
downloadblackbird-obmc-uboot-fbef8e6e7f1233ed20f8c5045e12c9cf31b43540.tar.gz
blackbird-obmc-uboot-fbef8e6e7f1233ed20f8c5045e12c9cf31b43540.zip
universal_c210: check the NULL pointer when get the PMIC
PMIC 2.0 require to test return pointer from pmic_get() Signed-off-by: Minkyu Kang <mk7.kang@samsung.com> Cc: Wolfgang Denk <wd@denx.de> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Diffstat (limited to 'board/samsung/universal_c210')
-rw-r--r--board/samsung/universal_c210/universal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c
index 4869798283..e742707f79 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;
OpenPOWER on IntegriCloud