Commit 5a7c536f authored by Saurabh Sengar's avatar Saurabh Sengar Committed by Jacek Anaszewski

leds: powernv: removing NULL check

No need to explicitly check for pointer to be null,
of_prop_next_string anyways returns NULL, if passed pointer is NULL
and hence loop will continue.
Signed-off-by: default avatarSaurabh Sengar <saurabh.truth@gmail.com>
Acked-by: default avatarVasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: default avatarJacek Anaszewski <j.anaszewski@samsung.com>
parent b964c5ba
......@@ -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),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment