projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b6fd26
)
power: supply: generic-adc-battery: drop memory alloc error message
author
Sebastian Reichel
<sre@kernel.org>
Fri, 17 Mar 2023 22:57:00 +0000
(23:57 +0100)
committer
Sebastian Reichel
<sre@kernel.org>
Wed, 29 Mar 2023 20:38:57 +0000
(22:38 +0200)
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>
drivers/power/supply/generic-adc-battery.c
patch
|
blob
|
history
diff --git
a/drivers/power/supply/generic-adc-battery.c
b/drivers/power/supply/generic-adc-battery.c
index d07eeb7d46d3405270eeb5608841376b737e21ea..771e5cfc49c31ee9bc8ab4aaf25c6b1bbaf0c72c 100644
(file)
--- 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;