summaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorSaurabh Sengar <saurabh.truth@gmail.com>2015-11-23 14:58:16 +0530
committerJacek Anaszewski <j.anaszewski@samsung.com>2016-01-04 09:57:38 +0100
commit5a7c536f26186c313e521502f942d5cdaf05b8ee (patch)
treedd028818f11adf0857f6c78c2b42628ea09f3911 /drivers/leds
parentb964c5ba6d52475d70e3550fbb3780ebabedf7db (diff)
downloadop-kernel-dev-5a7c536f26186c313e521502f942d5cdaf05b8ee.zip
op-kernel-dev-5a7c536f26186c313e521502f942d5cdaf05b8ee.tar.gz
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: Saurabh Sengar <saurabh.truth@gmail.com> Acked-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-powernv.c2
1 files changed, 0 insertions, 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),
OpenPOWER on IntegriCloud