Commit 2f25b975 authored by Sebastian Reichel's avatar Sebastian Reichel
Browse files

power: supply: generic-adc-battery: drop memory alloc error message



Error printing happens automatically for memory allocation problems.

Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarMatti Vaittinen <mazziesaccount@gmail.com>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent 3b6fd262
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -243,10 +243,8 @@ static int gab_probe(struct platform_device *pdev)
	bool any = false;

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

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