universal_c210: check the NULL pointer when get the PMIC
PATCH 1/1 universal_c210: check the NULL pointer when get the PMIC
PMIC 2.0 require to test return pointer from pmic_get()
--- board/samsung/universal_c210/universal.c | 6 ++++++ 1 file changed, 6 insertions(+)
board/samsung/universal_c210/universal.c +6 -0
@@ -343,6 +343,9 @@ static void init_pmic_lcd(void)struct pmic *p =pmic_get ("MAX8998_PMIC" ); +if (!p) +return -ENODEV ; +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 -ENODEV ; +if (pmic_probe (p))return ;
Signature · 1 line
1.7.9.5
PATCH v2 1/1 universal_c210: check the NULL pointer when get the PMIC
PMIC 2.0 require to test return pointer from pmic_get()
---
Changes in V2:
- Since functions are void type, remove the return value.
board/samsung/universal_c210/universal.c | 6 ++++++ 1 file changed, 6 insertions(+)
board/samsung/universal_c210/universal.c +6 -0
@@ -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 ;
Signature · 1 line
1.7.9.5
PATCH v2 1/1 universal_c210: check the NULL pointer when get the PMIC
Hi Minkyu,
Quoted 27 lines
PMIC 2.0 require to test return pointer from
pmic_get()Signed-off-by Minkyu Kang <[email protected]>Cc Lukasz Majewski <[email protected]>Cc Wolfgang Denk <[email protected]>---
Changes in V2:
- Since functions are void type, remove the return value.board/samsung/universal_c210/universal.c | 6 ++++++ 1 file changed, 6 insertions(+)(quoted diff) +0
-0
b/board/samsung/universal_c210/universal.cindex 4869798..e742707 100644 ---a/board/samsung/universal_c210/universal.c+++b/board/samsung/universal_c210/universal.cboard/samsung/universal_c210/universal.c +3
-0@@ -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 ;
board/samsung/universal_c210/universal.c static void lcd_power_on(void) · line 445
Quoted 9 lines
board/samsung/universal_c210/universal.c +3
-0@@ -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 ;
Signature · 5 lines
Best regards, Lukasz Majewski Samsung Poland R&D Center | Linux Platform Group
PATCH v2 1/1 universal_c210: check the NULL pointer when get the PMIC
Quoted 14 lines · Lukasz Majewski
Hi Minkyu,
Quoted 12 lines
PMIC 2.0 require to test return pointer from
pmic_get()Signed-off-by Minkyu Kang <[email protected]>Cc Lukasz Majewski <[email protected]>Cc Wolfgang Denk <[email protected]>---
Changes in V2:
- Since functions are void type, remove the return value.board/samsung/universal_c210/universal.c | 6 ++++++ 1 file changed, 6 insertions(+)
applied to u-boot-samsung/resolve.
Thanks.
Minkyu Kang.