lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <56530896.2050802@samsung.com>
Date:	Mon, 23 Nov 2015 13:37:42 +0100
From:	Jacek Anaszewski <j.anaszewski@...sung.com>
To:	Saurabh Sengar <saurabh.truth@...il.com>
Cc:	rpurdie@...ys.net, linux-leds@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] leds/powernv : removing NULL check

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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ