From: Minkyu Kang Date: Mon, 10 Dec 2012 13:43:57 +0000 (+0900) Subject: universal_c210: check the NULL pointer when get the PMIC X-Git-Tag: v2013.01-rc3~13^2^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fbef8e6e7f1233ed20f8c5045e12c9cf31b43540;p=u-boot 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 Cc: Wolfgang Denk Acked-by: Lukasz Majewski --- 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;