* [U-Boot] [PATCH] universal_c210: check the NULL pointer when get the PMIC
@ 2012-12-10 13:50 Minkyu Kang
2012-12-11 3:58 ` [U-Boot] [PATCH v2] " Minkyu Kang
0 siblings, 1 reply; 4+ messages in thread
From: Minkyu Kang @ 2012-12-10 13:50 UTC (permalink / raw)
To: u-boot
PMIC 2.0 require to test return pointer from pmic_get()
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Wolfgang Denk <wd@denx.de>
---
board/samsung/universal_c210/universal.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c
index 4869798..ae24469 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 -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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH v2] universal_c210: check the NULL pointer when get the PMIC
2012-12-10 13:50 [U-Boot] [PATCH] universal_c210: check the NULL pointer when get the PMIC Minkyu Kang
@ 2012-12-11 3:58 ` Minkyu Kang
2012-12-11 7:57 ` Lukasz Majewski
0 siblings, 1 reply; 4+ messages in thread
From: Minkyu Kang @ 2012-12-11 3:58 UTC (permalink / raw)
To: u-boot
PMIC 2.0 require to test return pointer from pmic_get()
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Wolfgang Denk <wd@denx.de>
---
Changes in V2:
- Since functions are void type, remove the return value.
board/samsung/universal_c210/universal.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c
index 4869798..e742707 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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH v2] universal_c210: check the NULL pointer when get the PMIC
2012-12-11 3:58 ` [U-Boot] [PATCH v2] " Minkyu Kang
@ 2012-12-11 7:57 ` Lukasz Majewski
2012-12-11 10:49 ` Minkyu Kang
0 siblings, 1 reply; 4+ messages in thread
From: Lukasz Majewski @ 2012-12-11 7:57 UTC (permalink / raw)
To: u-boot
Hi Minkyu,
> PMIC 2.0 require to test return pointer from pmic_get()
>
> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
> Cc: Lukasz Majewski <l.majewski@samsung.com>
> Cc: Wolfgang Denk <wd@denx.de>
> ---
> Changes in V2:
> - Since functions are void type, remove the return value.
>
> board/samsung/universal_c210/universal.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/board/samsung/universal_c210/universal.c
> b/board/samsung/universal_c210/universal.c index 4869798..e742707
> 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;
>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
--
Best regards,
Lukasz Majewski
Samsung Poland R&D Center | Linux Platform Group
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH v2] universal_c210: check the NULL pointer when get the PMIC
2012-12-11 7:57 ` Lukasz Majewski
@ 2012-12-11 10:49 ` Minkyu Kang
0 siblings, 0 replies; 4+ messages in thread
From: Minkyu Kang @ 2012-12-11 10:49 UTC (permalink / raw)
To: u-boot
On 11/12/12 16:57, Lukasz Majewski wrote:
> Hi Minkyu,
>
>> PMIC 2.0 require to test return pointer from pmic_get()
>>
>> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
>> Cc: Lukasz Majewski <l.majewski@samsung.com>
>> Cc: Wolfgang Denk <wd@denx.de>
>> ---
>> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-12-11 10:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-10 13:50 [U-Boot] [PATCH] universal_c210: check the NULL pointer when get the PMIC Minkyu Kang
2012-12-11 3:58 ` [U-Boot] [PATCH v2] " Minkyu Kang
2012-12-11 7:57 ` Lukasz Majewski
2012-12-11 10:49 ` Minkyu Kang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox