regulator: fixed: Remove redundant error message
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 20 Feb 2014 08:53:05 +0000 (14:23 +0530)
committerMark Brown <broonie@linaro.org>
Thu, 20 Feb 2014 11:22:35 +0000 (20:22 +0900)
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/fixed.c

index 3c307d6..c61f7e9 100644 (file)
@@ -130,10 +130,8 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
 
        drvdata = devm_kzalloc(&pdev->dev, sizeof(struct fixed_voltage_data),
                               GFP_KERNEL);
-       if (drvdata == NULL) {
-               dev_err(&pdev->dev, "Failed to allocate device data\n");
+       if (!drvdata)
                return -ENOMEM;
-       }
 
        drvdata->desc.name = devm_kstrdup(&pdev->dev,
                                          config->supply_name,