summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-da903x.c
diff options
context:
space:
mode:
authorXiubo Li2014-05-08 05:25:52 +0200
committerBryan Wu2014-05-08 08:28:08 +0200
commit0c9a03b68511daf078256367e7a98d7ff3b7dfcb (patch)
tree0edd16dbb3a39f6ff8726a76bfb1dfa3d324d536 /drivers/leds/leds-da903x.c
parentdrivers/leds: Replace __get_cpu_var use through this_cpu_ptr (diff)
downloadkernel-qcow2-linux-0c9a03b68511daf078256367e7a98d7ff3b7dfcb.tar.gz
kernel-qcow2-linux-0c9a03b68511daf078256367e7a98d7ff3b7dfcb.tar.xz
kernel-qcow2-linux-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-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 35dffb100388..54b8b5216b8b 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;