regulator: gpio-regulator: Remove unneeded OOM error message
authorFabio Estevam <fabio.estevam@freescale.com>
Fri, 24 Jan 2014 17:48:18 +0000 (15:48 -0200)
committerMark Brown <broonie@linaro.org>
Mon, 3 Feb 2014 12:30:21 +0000 (12:30 +0000)
There is no need to print an OOM message after devm_kzalloc, since there is
a generic OOM message in place.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/gpio-regulator.c

index c0a1d00b78c932a6982961334f9e3e9501592c50..bad44f366b3f69ddccb140e3026f929b00b3b048 100644 (file)
@@ -239,10 +239,8 @@ static int gpio_regulator_probe(struct platform_device *pdev)
 
        drvdata = devm_kzalloc(&pdev->dev, sizeof(struct gpio_regulator_data),
                               GFP_KERNEL);
-       if (drvdata == NULL) {
-               dev_err(&pdev->dev, "Failed to allocate device data\n");
+       if (drvdata == NULL)
                return -ENOMEM;
-       }
 
        drvdata->desc.name = kstrdup(config->supply_name, GFP_KERNEL);
        if (drvdata->desc.name == NULL) {
This page took 0.025679 seconds and 5 git commands to generate.