]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: bq256xx: Handle OOM correctly
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 10 Jan 2022 15:50:07 +0000 (16:50 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 11 Feb 2022 20:19:51 +0000 (21:19 +0100)
commit78eef4ebf90f94d9b2633432a2b59f6fd3050872
tree2feeb4d8be45d811752a3ad6b230adcb36aa8f2b
parent10b7722b1ccd2ad0eb485bc6e404797f3d2a668d
power: supply: bq256xx: Handle OOM correctly

Since we now return a pointer to an allocated object we need
to account for memory allocation failure in a separate
error path.

Fixes: eadb4e6b79a4 ("power: supply_core: Pass pointer to battery info")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/bq256xx_charger.c