aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/regulator/tps6524x-regulator.c5
1 files changed, 2 insertions, 3 deletions
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)
593 } 593 }
594 594
595 hw = devm_kzalloc(&spi->dev, sizeof(struct tps6524x), GFP_KERNEL); 595 hw = devm_kzalloc(&spi->dev, sizeof(struct tps6524x), GFP_KERNEL);
596 if (!hw) { 596 if (!hw)
597 dev_err(dev, "cannot allocate regulator private data\n");
598 return -ENOMEM; 597 return -ENOMEM;
599 } 598
600 spi_set_drvdata(spi, hw); 599 spi_set_drvdata(spi, hw);
601 600
602 memset(hw, 0, sizeof(struct tps6524x)); 601 memset(hw, 0, sizeof(struct tps6524x));