From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: Saurabh Sengar <saurabh.truth@gmail.com>
Cc: rpurdie@rpsys.net, linux-leds@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] leds/powernv : removing NULL check
Date: Mon, 23 Nov 2015 13:37:42 +0100 [thread overview]
Message-ID: <56530896.2050802@samsung.com> (raw)
In-Reply-To: <1448270896-23955-1-git-send-email-saurabh.truth@gmail.com>
On 11/23/2015 10:28 AM, Saurabh Sengar wrote:
> no need to explicitly check for pointer to be null,
> of_prop_next_string anyways return NULL, if passed pointer is NULL
> and hence loop will continue
>
> Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
> ---
> drivers/leds/leds-powernv.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/leds/leds-powernv.c b/drivers/leds/leds-powernv.c
> index 1e75e1f..bc2d76e 100644
> --- a/drivers/leds/leds-powernv.c
> +++ b/drivers/leds/leds-powernv.c
> @@ -256,8 +256,6 @@ static int powernv_led_classdev(struct platform_device *pdev,
>
> for_each_child_of_node(led_node, np) {
> p = of_find_property(np, "led-types", NULL);
> - if (!p)
> - continue;
>
> while ((cur = of_prop_next_string(p, cur)) != NULL) {
> powernv_led = devm_kzalloc(dev, sizeof(*powernv_led),
>
Applied, thanks.
--
Best Regards,
Jacek Anaszewski
next prev parent reply other threads:[~2015-11-23 12:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-23 9:28 [PATCH] leds/powernv : removing NULL check Saurabh Sengar
2015-11-23 12:37 ` Jacek Anaszewski [this message]
2015-11-25 14:44 ` Vasant Hegde
2015-11-25 15:17 ` Jacek Anaszewski
2015-11-25 16:42 ` Vasant Hegde
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=56530896.2050802@samsung.com \
--to=j.anaszewski@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=rpurdie@rpsys.net \
--cc=saurabh.truth@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox