diff options
| author | Charles Han <[email protected]> | 2025-05-19 02:47:41 +0000 |
|---|---|---|
| committer | Sebastian Reichel <[email protected]> | 2025-06-22 17:23:04 +0000 |
| commit | d9fa3aae08f99493e67fb79413c0e95d30fca5e9 (patch) | |
| tree | c19c8ee6b96ca57da704718e8e1ae59dadd01b07 /rust/helpers | |
| parent | power: supply: bq25980_charger: Constify reg_default array (diff) | |
| download | kernel-d9fa3aae08f99493e67fb79413c0e95d30fca5e9.tar.gz kernel-d9fa3aae08f99493e67fb79413c0e95d30fca5e9.zip | |
power: supply: cpcap-charger: Fix null check for power_supply_get_by_name
In the cpcap_usb_detect() function, the power_supply_get_by_name()
function may return `NULL` instead of an error pointer.
To prevent potential null pointer dereferences, Added a null check.
Fixes: eab4e6d953c1 ("power: supply: cpcap-charger: get the battery inserted infomation from cpcap-battery")
Signed-off-by: Charles Han <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sebastian Reichel <[email protected]>
Diffstat (limited to 'rust/helpers')
0 files changed, 0 insertions, 0 deletions
