android_kernel_motorola_sm6375/drivers/power
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Charles Han 05b5621bec power: supply: max14577: Handle NULL pdata when CONFIG_OF is not set
[ Upstream commit 2937f5d2e24eefef8cb126244caec7fe3307f724 ]

When the kernel is not configured  CONFIG_OF, the max14577_charger_dt_init
function returns NULL. Fix the max14577_charger_probe functionby returning
-ENODATA instead of potentially passing a NULL pointer to PTR_ERR.

This fixes the below smatch warning:
max14577_charger_probe() warn: passing zero to 'PTR_ERR'

Fixes: e30110e9c9 ("charger: max14577: Configure battery-dependent settings from DTS and sysfs")
Signed-off-by: Charles Han <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sebastian Reichel <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2025-08-28 16:21:20 +02:00
..
avs soc: ti: smartreflex: Use IRQF_NO_AUTOEN flag in request_irq() 2024-12-14 19:44:24 +01:00
reset power: reset: brcmstb: Do not go into infinite loop if reset fails 2024-11-08 16:20:38 +01:00
supply power: supply: max14577: Handle NULL pdata when CONFIG_OF is not set 2025-08-28 16:21:20 +02:00
Kconfig
Makefile