OpenCloudOS-Kernel/drivers/power/supply
Kunwu Chan e2717302fb power: supply: Fix null pointer dereference in smb2_probe
[ Upstream commit 88f04bc3e737155e13caddf0ba8ed19db87f0212 ]

devm_kasprintf and devm_kzalloc return a pointer to dynamically
allocated memory which can be NULL upon failure.

Fixes: 8648aeb5d7 ("power: supply: add Qualcomm PMI8998 SMB2 Charger driver")
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Link: https://lore.kernel.org/r/20231124075021.1335289-1-chentao@kylinos.cn
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-25 15:35:54 -08:00
..
88pm860x_battery.c power: supply: 88pm860x_battery: Remove unnecessary int for long long 2021-04-02 14:14:58 +02:00
88pm860x_charger.c power: supply: 88pm860x: simplify using devm 2022-11-17 23:47:23 +01:00
Kconfig power: supply: rt5033_charger: recognize EXTCON setting 2023-09-12 18:30:59 +02:00
Makefile power supply and reset changes for the 6.5 series 2023-07-03 17:23:16 -07:00
ab8500-bm.h power: supply: ab8500: Standardize BTI resistance 2022-02-28 11:34:31 +01:00
ab8500-chargalg.h power: supply: ab8500: Drop external charger leftovers 2022-07-17 00:51:35 +02:00
ab8500_bmdata.c power: supply: ab8500: Standardize BTI resistance 2022-02-28 11:34:31 +01:00
ab8500_btemp.c power: supply: ab8500: Set typing and props 2023-09-11 12:51:07 +02:00
ab8500_chargalg.c power: supply: ab8500: Set typing and props 2023-09-11 12:51:07 +02:00
ab8500_charger.c power: supply: ab8500: Fix error handling in ab8500_charger_init() 2022-11-26 23:14:32 +01:00
ab8500_fg.c power: supply: ab8500: Fix external_power_changed race 2023-05-08 15:03:50 +02:00
acer_a500_battery.c power: supply: Add battery gauge driver for Acer Iconia Tab A500 2021-01-14 23:39:43 +01:00
act8945a_charger.c power: supply: act8945a: correct kerneldoc 2021-04-20 16:18:08 +02:00
adp5061.c power: supply: Switch i2c drivers back to use .probe() 2023-06-04 22:33:22 +02:00
apm_power.c
axp20x_ac_power.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
axp20x_battery.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
axp20x_usb_power.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
axp288_charger.c power: supply: axp288_charger: Use alt usb-id extcon on some x86 android tablets 2023-04-01 23:01:42 +02:00
axp288_fuel_gauge.c power: supply: axp288_fuel_gauge: Fix external_power_changed race 2023-05-08 15:04:53 +02:00
bd99954-charger.c power: supply: bd99954: make read-only array sub_status_reg 2023-07-19 23:12:36 +02:00
bd99954-charger.h power: supply: Support ROHM bd99954 charger 2020-05-10 02:35:49 +02:00
bq27xxx_battery.c power: supply: bq27xxx: Use mod_delayed_work() instead of cancel() + schedule() 2023-05-08 15:29:12 +02:00
bq27xxx_battery_hdq.c power supply and reset changes for the v5.10 series 2020-10-20 10:56:34 -07:00
bq27xxx_battery_i2c.c power supply and reset changes for the 6.5 series 2023-07-03 17:23:16 -07:00
bq256xx_charger.c power: supply: bq256xx: fix some problem in bq256xx_hw_init 2024-01-25 15:35:50 -08:00
bq2415x_charger.c power: supply: Switch i2c drivers back to use .probe() 2023-06-04 22:33:22 +02:00
bq2515x_charger.c power: supply: Switch i2c drivers back to use .probe() 2023-06-04 22:33:22 +02:00
bq24190_charger.c power: supply: bq24190: Considers FORCE_20PCT when getting IPRECHG 2023-07-19 22:55:59 +02:00
bq24257_charger.c power: supply: Switch i2c drivers back to use .probe() 2023-06-04 22:33:22 +02:00
bq24735-charger.c power: supply: Switch i2c drivers back to use .probe() 2023-06-04 22:33:22 +02:00
bq25890_charger.c power supply and reset changes for the 6.5 series 2023-07-03 17:23:16 -07:00
bq25980_charger.c power: supply: Switch i2c drivers back to use .probe() 2023-06-04 22:33:22 +02:00
bq25980_charger.h power: supply: bq25980: Add support for the BQ259xx family 2020-10-04 01:54:35 +02:00
charger-manager.c power: supply: charger-manager: Use of_property_read_bool() for boolean properties 2023-03-12 23:33:43 +01:00
collie_battery.c power: supply: collie_battery: Convert to GPIO descriptors (part 2) 2023-02-03 13:28:59 +01:00
cpcap-battery.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
cpcap-charger.c power: supply: cpcap-charger: fix repeated words in comments 2022-09-11 10:52:05 +02:00
cros_peripheral_charger.c power: supply: cros_pchg: Sync port status on resume 2023-05-08 14:31:24 +02:00
cros_usbpd-charger.c power: supply: cros_usbpd: reclassify "default case!" as debug 2023-03-10 00:20:43 +01:00
cw2015_battery.c power: supply: cw2015: correct time_to_empty units in sysfs 2024-01-25 15:35:50 -08:00
da9030_battery.c power: Convert to DEFINE_SHOW_ATTRIBUTE 2020-07-27 00:05:56 +02:00
da9052-battery.c
da9150-charger.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
da9150-fg.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
ds2760_battery.c ARM: pxa: remove unused board files 2023-01-20 11:23:44 +01:00
ds2780_battery.c power: supply: use sysfs_emit() instead of sprintf() for sysfs show() 2023-01-02 09:13:37 +01:00
ds2781_battery.c power: supply: use sysfs_emit() instead of sprintf() for sysfs show() 2023-01-02 09:13:37 +01:00
ds2782_battery.c power: supply: Switch i2c drivers back to use .probe() 2023-06-04 22:33:22 +02:00
generic-adc-battery.c power: supply: generic-adc-battery: style fixes 2023-03-29 22:38:57 +02:00
goldfish_battery.c power: supply: Remove unnecessary print function dev_err() 2022-06-09 20:27:21 +02:00
gpio-charger.c power: supply: gpio-charger: add charge-current-limit feature 2020-08-27 21:13:23 +02:00
ingenic-battery.c power: supply_core: Pass pointer to battery info 2022-01-03 18:53:10 +01:00
ip5xxx_power.c power: supply: Switch i2c drivers back to use .probe() 2023-06-04 22:33:22 +02:00
ipaq_micro_battery.c
isp1704_charger.c
lego_ev3_battery.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
lp8727_charger.c power: supply: Switch i2c drivers back to use .probe() 2023-06-04 22:33:22 +02:00
lp8788-charger.c power: supply: use sysfs_emit() instead of scnprintf() for sysfs show() 2023-01-02 08:54:07 +01:00
lt3651-charger.c
ltc2941-battery-gauge.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
ltc4162-l-charger.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
max1721x_battery.c power: supply: max1721x: Use strscpy() is more robust and safer 2023-02-03 13:58:41 +01:00
max8903_charger.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
max8925_power.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
max8997_charger.c extcon: Fix extcon_get_extcon_dev() error handling 2022-05-13 17:03:40 +09:00
max8998_charger.c power: supply: max8998_charger: Correct ONLINE and add STATUS props 2020-06-19 19:58:23 +02:00
max14577_charger.c power: supply: use sysfs_emit() instead of scnprintf() for sysfs show() 2023-01-02 08:54:07 +01:00
max14656_charger_detector.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
max17040_battery.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
max17042_battery.c power: supply: Switch i2c drivers back to use .probe() 2023-06-04 22:33:22 +02:00
max77650-charger.c power: supply: max77650: Make max77650_charger_disable() return void 2023-02-13 21:20:39 +01:00
max77693_charger.c power: supply: use sysfs_emit() instead of scnprintf() for sysfs show() 2023-01-02 08:54:07 +01:00
max77976_charger.c power: supply: Switch i2c drivers back to use .probe() 2023-06-04 22:33:22 +02:00
mp2629_charger.c power: supply: use sysfs_emit() instead of sprintf() for sysfs show() 2023-01-02 09:13:37 +01:00
mt6360_charger.c power: supply: mt6360: add a check of devm_work_autocancel in mt6360_charger_probe 2023-05-16 00:46:53 +02:00
mt6370-charger.c power: supply: mt6370: Fix missing error code in mt6370_chg_toggle_cfo() 2023-09-11 20:15:43 +02:00
olpc_battery.c power: supply: use sysfs_emit() instead of sprintf() for sysfs show() 2023-01-02 09:13:37 +01:00
pcf50633-charger.c power: supply: use sysfs_emit() instead of sprintf() for sysfs show() 2023-01-02 09:13:37 +01:00
pmu_battery.c
power_supply.h driver core: make struct class.dev_uevent() take a const * 2022-11-24 17:12:15 +01:00
power_supply_core.c power: supply: core: Use blocking_notifier_call_chain to avoid RCU complaint 2023-11-08 11:56:20 +01:00
power_supply_hwmon.c power: supply: hwmon: constify pointers to hwmon_channel_info 2023-05-08 15:33:16 +02:00
power_supply_leds.c - New Drivers 2023-07-03 11:26:05 -07:00
power_supply_sysfs.c power: supply: core: fix use after free in uevent 2023-09-19 14:08:34 +02:00
qcom_battmgr.c power: supply: qcom_battmgr: fix enable request endianness 2023-09-30 21:00:20 +02:00
qcom_pmi8998_charger.c power: supply: Fix null pointer dereference in smb2_probe 2024-01-25 15:35:54 -08:00
qcom_smbb.c power: supply: qcom_smbb: support pm8226 2021-11-30 11:34:27 +01:00
rk817_charger.c power: supply: rk817: Fix node refcount leak 2023-09-20 19:37:15 +02:00
rn5t618_power.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
rt5033_battery.c power supply and reset changes for the 6.5 series 2023-07-03 17:23:16 -07:00
rt5033_charger.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
rt9455_charger.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
rt9467-charger.c power: supply: rt9467: Fix rt9467_run_aicl() 2023-09-14 18:09:14 +02:00
rt9471.c power: supply: Switch i2c drivers back to use .probe() 2023-06-04 22:33:22 +02:00
rx51_battery.c
samsung-sdi-battery.c power: supply: samsung-sdi-battery: Add missing charge restart voltages 2022-04-13 12:05:22 +02:00
samsung-sdi-battery.h power: supply: Static data for Samsung batteries 2022-03-04 22:20:18 +01:00
sbs-battery.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
sbs-charger.c power supply and reset changes for the 6.5 series 2023-07-03 17:23:16 -07:00
sbs-manager.c power: supply: Switch i2c drivers back to use .probe() 2023-06-04 22:33:22 +02:00
sc27xx_fuel_gauge.c power: supply: sc27xx: Fix external_power_changed race 2023-05-08 15:06:12 +02:00
sc2731_charger.c power: supply_core: Pass pointer to battery info 2022-01-03 18:53:10 +01:00
smb347-charger.c power: supply: Switch i2c drivers back to use .probe() 2023-06-04 22:33:22 +02:00
surface_battery.c platform/surface: aggregator: Enforce use of target-ID enum in device ID macros 2023-02-02 22:48:20 +01:00
surface_charger.c platform/surface: aggregator: Enforce use of target-ID enum in device ID macros 2023-02-02 22:48:20 +01:00
test_power.c power: supply: test-power: use strscpy() instead of strncpy() 2023-02-03 13:43:48 +01:00
tps65090-charger.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
tps65217_charger.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
twl4030_charger.c power: Explicitly include correct DT includes 2023-07-19 22:47:03 +02:00
twl4030_madc_battery.c power: supply: twl4030_madc_battery: Refactor twl4030_madc_bat_ext_changed() 2023-05-08 15:07:56 +02:00
ucs1002_power.c power: supply: ucs1002: fix error code in ucs1002_get_property() 2023-09-14 17:38:02 +02:00
ug3105_battery.c power: supply: Switch i2c drivers back to use .probe() 2023-06-04 22:33:22 +02:00
wilco-charger.c power: supply: wilco_ec: Add long life charging mode 2020-07-31 14:33:56 +02:00
wm97xx_battery.c power: supply: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:53 -07:00
wm831x_backup.c
wm831x_power.c power: supply: wm831x_power: fix spelling mistake on function name 2021-10-02 17:31:15 +02:00
wm8350_power.c power: supply: use sysfs_emit() instead of sprintf() for sysfs show() 2023-01-02 09:13:37 +01:00