summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-da903x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/leds/leds-da903x.c')
-rw-r--r--drivers/leds/leds-da903x.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/leds/leds-da903x.c b/drivers/leds/leds-da903x.c
index 35dffb10038..54b8b5216b8 100644
--- a/drivers/leds/leds-da903x.c
+++ b/drivers/leds/leds-da903x.c
@@ -108,10 +108,8 @@ static int da903x_led_probe(struct platform_device *pdev)
}
led = devm_kzalloc(&pdev->dev, sizeof(struct da903x_led), GFP_KERNEL);
- if (led == NULL) {
- dev_err(&pdev->dev, "failed to alloc memory for LED%d\n", id);
+ if (!led)
return -ENOMEM;
- }
led->cdev.name = pdata->name;
led->cdev.default_trigger = pdata->default_trigger;