diff options
author | Sebastian Reichel <sre@kernel.org> | 2023-03-18 01:57:00 +0300 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2023-03-29 23:38:57 +0300 |
commit | 2f25b9750fa0d79090cadf6e7d0e3edba4fa58e3 (patch) | |
tree | 7ff32a607c75e85d9ef9716579df98e8061f2a45 /drivers/power | |
parent | 3b6fd262bfcd696aa98af99d71dcf952f289cbee (diff) | |
download | linux-2f25b9750fa0d79090cadf6e7d0e3edba4fa58e3.tar.xz |
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>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/supply/generic-adc-battery.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/power/supply/generic-adc-battery.c b/drivers/power/supply/generic-adc-battery.c index d07eeb7d46d3..771e5cfc49c3 100644 --- a/drivers/power/supply/generic-adc-battery.c +++ b/drivers/power/supply/generic-adc-battery.c @@ -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; |