From: Sachin Kamat Date: Thu, 20 Feb 2014 08:53:16 +0000 (+0530) Subject: regulator: tps6524x: Remove redundant error message X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=516add1d9d504c5345c7ffb32f99d9343609fddf;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git regulator: tps6524x: Remove redundant error message kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/tps6524x-regulator.c b/drivers/regulator/tps6524x-regulator.c index 9f6bfda711b7..5b494db9f95c 100644 --- a/drivers/regulator/tps6524x-regulator.c +++ b/drivers/regulator/tps6524x-regulator.c @@ -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));