Skip to content

Commit 2f25b97

Browse files
committed
power: supply: generic-adc-battery: drop memory alloc error message
Error printing happens automatically for memory allocation problems. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
1 parent 3b6fd26 commit 2f25b97

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/power/supply/generic-adc-battery.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,8 @@ static int gab_probe(struct platform_device *pdev)
243243
bool any = false;
244244

245245
adc_bat = devm_kzalloc(&pdev->dev, sizeof(*adc_bat), GFP_KERNEL);
246-
if (!adc_bat) {
247-
dev_err(&pdev->dev, "failed to allocate memory\n");
246+
if (!adc_bat)
248247
return -ENOMEM;
249-
}
250248

251249
psy_cfg.drv_data = adc_bat;
252250
psy_desc = &adc_bat->psy_desc;

0 commit comments

Comments
 (0)