Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: da9210: Remove redundant error message

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>

authored by

Sachin Kamat and committed by
Mark Brown
6c48acfb 38dbfb59

+1 -4
+1 -4
drivers/regulator/da9210-regulator.c
··· 134 134 int error; 135 135 136 136 chip = devm_kzalloc(&i2c->dev, sizeof(struct da9210), GFP_KERNEL); 137 - if (NULL == chip) { 138 - dev_err(&i2c->dev, 139 - "Cannot kzalloc memory for regulator structure\n"); 137 + if (!chip) 140 138 return -ENOMEM; 141 - } 142 139 143 140 chip->regmap = devm_regmap_init_i2c(i2c, &da9210_regmap_config); 144 141 if (IS_ERR(chip->regmap)) {