diff options
| author | Charles Han <[email protected]> | 2025-05-19 06:16:01 +0000 |
|---|---|---|
| committer | Sebastian Reichel <[email protected]> | 2025-06-22 17:29:23 +0000 |
| commit | 2937f5d2e24eefef8cb126244caec7fe3307f724 (patch) | |
| tree | 74cf5daf3e3ac14ab8362b49dd37434e3c38741f /mm/util.c | |
| parent | power: return the correct error code (diff) | |
| download | kernel-2937f5d2e24eefef8cb126244caec7fe3307f724.tar.gz kernel-2937f5d2e24eefef8cb126244caec7fe3307f724.zip | |
power: supply: max14577: Handle NULL pdata when CONFIG_OF is not set
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: e30110e9c96f ("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]>
Diffstat (limited to 'mm/util.c')
0 files changed, 0 insertions, 0 deletions
