From 0c9a03b68511daf078256367e7a98d7ff3b7dfcb Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Wed, 7 May 2014 20:25:52 -0700 Subject: 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 Signed-off-by: Bryan Wu --- drivers/leds/leds-da903x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/leds/leds-da903x.c') 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; -- cgit v1.2.3-55-g7522