Commit 30f21ef2 authored by Markus Elfring's avatar Markus Elfring Committed by Jacek Anaszewski

leds: powernv: Delete an error message for a failed memory allocation in powernv_led_create()

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
parent 34b558a5
...@@ -224,12 +224,8 @@ static int powernv_led_create(struct device *dev, ...@@ -224,12 +224,8 @@ static int powernv_led_create(struct device *dev,
powernv_led->cdev.name = devm_kasprintf(dev, GFP_KERNEL, "%s:%s", powernv_led->cdev.name = devm_kasprintf(dev, GFP_KERNEL, "%s:%s",
powernv_led->loc_code, powernv_led->loc_code,
led_type_desc); led_type_desc);
if (!powernv_led->cdev.name) { if (!powernv_led->cdev.name)
dev_err(dev,
"%s: Memory allocation failed for classdev name\n",
__func__);
return -ENOMEM; return -ENOMEM;
}
powernv_led->cdev.brightness_set_blocking = powernv_brightness_set; powernv_led->cdev.brightness_set_blocking = powernv_brightness_set;
powernv_led->cdev.brightness_get = powernv_brightness_get; powernv_led->cdev.brightness_get = powernv_brightness_get;
......
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