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>
This commit is contained in:
Minkyu Kang 2012-12-10 22:43:57 +09:00
parent 211e8438cf
commit fbef8e6e7f

View file

@ -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;