mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
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>
This commit is contained in:
parent
3b6fd262bf
commit
2f25b9750f
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user