summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-adp5520.c
diff options
context:
space:
mode:
authorXiubo Li <Li.Xiubo@freescale.com>2014-05-07 20:25:52 -0700
committerBryan Wu <cooloney@gmail.com>2014-05-08 14:28:08 +0800
commit0c9a03b68511daf078256367e7a98d7ff3b7dfcb (patch)
tree0edd16dbb3a39f6ff8726a76bfb1dfa3d324d536 /drivers/leds/leds-adp5520.c
parent24c9301ffd21356bcd865a5155a501e5059c4c6f (diff)
downloadlinux-stable-0c9a03b68511daf078256367e7a98d7ff3b7dfcb.tar.gz
linux-stable-0c9a03b68511daf078256367e7a98d7ff3b7dfcb.tar.bz2
linux-stable-0c9a03b68511daf078256367e7a98d7ff3b7dfcb.zip
leds: Remove duplicated OOM message for individual driver
The OOM message of individual driver is unnecessary, and this is duplicate the memory subsystem generic OOM message. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers/leds/leds-adp5520.c')
-rw-r--r--drivers/leds/leds-adp5520.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/leds/leds-adp5520.c b/drivers/leds/leds-adp5520.c
index 86b5bdb0c773..5036d7b4f82e 100644
--- a/drivers/leds/leds-adp5520.c
+++ b/drivers/leds/leds-adp5520.c
@@ -120,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;