diff options
Diffstat (limited to 'drivers/leds/leds-adp5520.c')
| -rw-r--r-- | drivers/leds/leds-adp5520.c | 6 | 
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/leds/leds-adp5520.c b/drivers/leds/leds-adp5520.c index 7e311a120b1..5036d7b4f82 100644 --- a/drivers/leds/leds-adp5520.c +++ b/drivers/leds/leds-adp5520.c @@ -15,7 +15,6 @@  #include <linux/module.h>  #include <linux/kernel.h> -#include <linux/init.h>  #include <linux/platform_device.h>  #include <linux/leds.h>  #include <linux/workqueue.h> @@ -121,13 +120,10 @@ static int adp5520_led_probe(struct platform_device *pdev)  	led = devm_kzalloc(&pdev->dev, sizeof(*led) * pdata->num_leds,  				GFP_KERNEL); -	if (led == NULL) { -		dev_err(&pdev->dev, "failed to alloc memory\n"); +	if (!led)  		return -ENOMEM; -	}  	ret = adp5520_led_prepare(pdev); -  	if (ret) {  		dev_err(&pdev->dev, "failed to write\n");  		return ret;  | 
