diff options
Diffstat (limited to 'drivers/leds/leds-da9052.c')
-rw-r--r-- | drivers/leds/leds-da9052.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/leds/leds-da9052.c b/drivers/leds/leds-da9052.c index 01486adc7f8b..e4da1f460ac5 100644 --- a/drivers/leds/leds-da9052.c +++ b/drivers/leds/leds-da9052.c @@ -126,8 +126,7 @@ static int da9052_led_probe(struct platform_device *pdev) led = devm_kzalloc(&pdev->dev, sizeof(struct da9052_led) * pled->num_leds, GFP_KERNEL); - if (led == NULL) { - dev_err(&pdev->dev, "Failed to alloc memory\n"); + if (!led) { error = -ENOMEM; goto err; } |