regulator: tps6524x: Remove redundant error message
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 20 Feb 2014 08:53:16 +0000 (14:23 +0530)
committerMark Brown <broonie@linaro.org>
Thu, 20 Feb 2014 11:54:59 +0000 (20:54 +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/tps6524x-regulator.c

index 9f6bfda711b73a6dae9cdc9b8be3b69b2f5e88cc..5b494db9f95c90aba642c44f8af58910c71b1711 100644 (file)
@@ -593,10 +593,9 @@ static int pmic_probe(struct spi_device *spi)
        }
 
        hw = devm_kzalloc(&spi->dev, sizeof(struct tps6524x), GFP_KERNEL);
-       if (!hw) {
-               dev_err(dev, "cannot allocate regulator private data\n");
+       if (!hw)
                return -ENOMEM;
-       }
+
        spi_set_drvdata(spi, hw);
 
        memset(hw, 0, sizeof(struct tps6524x));