leds/powernv : removing NULL check
PATCH 1/1 leds/powernv : removing NULL check
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
--- drivers/leds/leds-powernv.c | 2 -- 1 file changed, 2 deletions(-)
drivers/leds/leds-powernv.c +0 -2
@@ -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),
Signature · 1 line
1.9.1
Jacek Anaszewski
AppliedQuoted 15 lines · Saurabh Sengar
no need to explicitly check for pointer to be null,
of_prop_next_stringanyways return NULL, if passed pointer is NULL and hence loop will continueSigned-off-by Saurabh Sengar <[email protected]>--- drivers/leds/leds-powernv.c | 2 -- 1 file changed, 2 deletions(-)drivers/leds/leds-powernv.c +0
-0
drivers/leds/leds-powernv.c static int powernv_led_classdev(struct platform_device *pdev, · line 261
Quoted 8 lines
drivers/leds/leds-powernv.c +0
-2@@ -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.
Signature · 2 lines
Best Regards, Jacek Anaszewski
Quoted 3 lines · Saurabh Sengar
no need to explicitly check for pointer to be null,
of_prop_next_stringanyways return NULL, if passed pointer is NULL and hence loop will continue
Thanks! Patch looks good.
-Vasant
Jacek Anaszewski
Acked-by Vasant HegdeQuoted 10 lines · Vasant Hegde
Quoted 3 lines · Saurabh Sengar
no need to explicitly check for pointer to be null,
of_prop_next_stringanyways return NULL, if passed pointer is NULL and hence loop will continueThanks! Patch looks good.
-Vasant
I infer that you offer your:
Can I add it? :)
Signature · 2 lines
Best Regards, Jacek Anaszewski
Quoted 6 lines · Jacek Anaszewski
Quoted 5 lines · Vasant Hegde
Quoted 3 lines · Saurabh Sengar
no need to explicitly check for pointer to be null,
of_prop_next_stringanyways return NULL, if passed pointer is NULL and hence loop will continue
Quoted 7 lines
Quoted 5 lines
Thanks! Patch looks good.
-Vasant
I infer that you offer your:
Yes.. Forgot to add Ack-by tag.
Quoted 4 lines
Acked-by Vasant Hegde <[email protected]>Can I add it? :)
Sure. Thanks!
-Vasant