mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 14:10:43 +00:00
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:
parent
211e8438cf
commit
fbef8e6e7f
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue