From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] universal_c210: check the NULL pointer when get the PMIC
Date: Tue, 11 Dec 2012 08:57:52 +0100 [thread overview]
Message-ID: <20121211085752.1e0031f9@amdc308.digital.local> (raw)
In-Reply-To: <50C6AF7F.40607@samsung.com>
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
next prev parent reply other threads:[~2012-12-11 7:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2012-12-11 10:49 ` Minkyu Kang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121211085752.1e0031f9@amdc308.digital.local \
--to=l.majewski@samsung.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.