linux-stable/drivers
Su Hui 96d289b57d power: supply: bq256xx: fix some problem in bq256xx_hw_init
[ Upstream commit b55d073e65 ]

smatch complains that there is a buffer overflow and clang complains
'ret' is never read.

Smatch error:
drivers/power/supply/bq256xx_charger.c:1578 bq256xx_hw_init() error:
buffer overflow 'bq256xx_watchdog_time' 4 <= 4

Clang static checker:
Value stored to 'ret' is never read.

Add check for buffer overflow and error code from regmap_update_bits().

Fixes: 32e4978bb9 ("power: supply: bq256xx: Introduce the BQ256XX charger driver")
Signed-off-by: Su Hui <suhui@nfschina.com>
Link: https://lore.kernel.org/r/20231116041822.1378758-1-suhui@nfschina.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-25 14:52:50 -08:00
..
accessibility
acpi ACPI: extlog: Clear Extended Error Log status when RAS_CEC handled the error 2024-01-25 14:52:34 -08:00
amba amba: bus: fix refcount leak 2023-09-19 12:22:47 +02:00
android binder: fix race between mmput() and do_exit() 2024-01-25 14:52:46 -08:00
ata ata: pata_isapnp: Add missing error check for devm_ioport_map() 2023-12-03 07:31:21 +01:00
atm atm: solos-pci: Fix potential deadlock on &tx_queue_lock 2023-12-20 15:17:35 +01:00
auxdisplay
base device property: Allow const parameter to dev_fwnode() 2024-01-05 15:13:40 +01:00
bcma
block null_blk: don't cap max_hw_sectors to BLK_DEF_MAX_SECTORS 2024-01-25 14:52:40 -08:00
bluetooth Bluetooth: btmtkuart: fix recv_buf() return value 2024-01-25 14:52:40 -08:00
bus bus: ti-sysc: Flush posted write only after srst_udelay 2024-01-05 15:13:35 +01:00
cdrom
char hwrng: geode - fix accessing registers 2023-11-20 11:08:22 +01:00
clk clk: fixed-rate: add devm_clk_hw_register_fixed_rate 2024-01-25 14:52:44 -08:00
clocksource clocksource/drivers/timer-atmel-tcb: Fix initialization on SAM9 hardware 2023-11-28 16:56:15 +00:00
comedi
connector
counter counter: microchip-tcb-capture: Fix the use of internal GCLK logic 2023-10-19 23:05:37 +02:00
cpufreq cpufreq: scmi: process the result of devm_of_clk_add_hw_provider() 2024-01-25 14:52:33 -08:00
cpuidle powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT 2023-09-19 12:22:42 +02:00
crypto virtio-crypto: fix memory leak in virtio_crypto_alg_skcipher_close_session() 2024-01-25 14:52:46 -08:00
cxl cxl/mem: Fix shutdown order 2023-11-20 11:08:27 +01:00
dax
dca
devfreq PM / devfreq: rockchip-dfi: Make pmu regmap mandatory 2023-11-20 11:08:15 +01:00
dio
dma dmaengine: stm32-mdma: correct desc prep when channel running 2023-11-28 16:56:31 +00:00
dma-buf
edac EDAC/thunderx: Fix possible out-of-bounds string access 2024-01-25 14:52:32 -08:00
eisa
extcon
firewire firewire: ohci: suppress unexpected system reboot in AMD Ryzen machines and ASM108x/VT630x PCIe cards 2024-01-15 18:51:22 +01:00
firmware firmware: meson_sm: populate platform devices from sm device tree data 2024-01-25 14:52:36 -08:00
fpga
fsi fsi: aspeed: Reset master errors after CFAM reset 2023-09-19 12:22:46 +02:00
gnss
gpio gpio: dwapb: mask/unmask IRQ when disable/enale it 2024-01-05 15:13:35 +01:00
gpu drm/amd/pm/smu7: fix a memleak in smu7_hwmgr_backend_init 2024-01-25 14:52:45 -08:00
greybus
hid HID: wacom: Correct behavior when processing some confidence == false touches 2024-01-25 14:52:49 -08:00
hsi
hv
hwmon hwmon: (corsair-psu) Fix probe when built-in 2024-01-25 14:52:29 -08:00
hwspinlock
hwtracing coresight: etm4x: Fix width of CCITMIN field 2024-01-25 14:52:32 -08:00
i2c i2c: rk3x: fix potential spinlock recursion on poll 2024-01-25 14:52:30 -08:00
i3c i3c: master: svc: fix SDA keep low when polling IBIWON timeout happen 2023-11-28 16:56:32 +00:00
idle
iio iio: adc: ad7091r: Pass iio_dev to event handler 2024-01-25 14:52:49 -08:00
infiniband IB/iser: Prevent invalidating wrong MR 2024-01-25 14:52:45 -08:00
input Input: atkbd - use ab83 as id when skipping the getid command 2024-01-25 14:52:46 -08:00
interconnect interconnect: Treat xlate() returning NULL node as an error 2024-01-05 15:13:32 +01:00
iommu iommu/dma: Trace bounce buffer usage when mapping buffers 2024-01-25 14:52:49 -08:00
ipack
irqchip irqchip/stm32-exti: add missing DT IRQ flag translation 2023-11-08 17:26:45 +01:00
isdn
leds leds: aw2013: Select missing dependency REGMAP_I2C 2024-01-25 14:52:50 -08:00
macintosh
mailbox
mcb mcb: fix error handling for different scenarios when parsing 2023-11-28 16:56:31 +00:00
md Revert "md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d" 2024-01-25 14:52:31 -08:00
media media: dvb-frontends: m88ds3103: Fix a memory leak in an error handling path of m88ds3103_probe() 2024-01-25 14:52:43 -08:00
memory
memstick
message
mfd mfd: intel-lpss: Fix the fractional clock divider flags 2024-01-25 14:52:50 -08:00
misc misc: mei: client.c: fix problem of return '-EOVERFLOW' in mei_cl_write 2023-12-13 18:36:45 +01:00
mmc mmc: sdhci_omap: Fix TI SoC dependencies 2024-01-25 14:52:45 -08:00
most
mtd mtd: Fix gluebi NULL pointer dereference caused by ftl notifier 2024-01-25 14:52:34 -08:00
mux
net wifi: mwifiex: configure BSSID consistently when starting AP 2024-01-25 14:52:49 -08:00
nfc
ntb ntb: Fix calculation ntb_transport_tx_free_entry() 2023-09-19 12:22:51 +02:00
nubus
nvdimm nd_btt: Make BTT lanes preemptible 2023-11-20 11:08:22 +01:00
nvme nvme: introduce helper function to get ctrl state 2024-01-25 14:52:28 -08:00
nvmem nvmem: imx: correct nregs for i.MX6UL 2023-11-08 17:26:41 +01:00
of of: unittest: Fix of_count_phandle_with_args() expected value message 2024-01-25 14:52:46 -08:00
opp OPP: Fix passing 0 to PTR_ERR in _opp_attach_genpd() 2023-09-19 12:22:31 +02:00
parisc parisc: iosapic.c: Fix sparse warnings 2023-10-06 13:18:15 +02:00
parport parport: parport_serial: Add Brainboxes device IDs and geometry 2024-01-25 14:52:31 -08:00
pci PCI: mediatek: Clear interrupt status before dispatching handler 2024-01-25 14:52:49 -08:00
pcmcia pcmcia: ds: fix possible name leak in error path in pcmcia_device_add() 2023-11-20 11:08:27 +01:00
perf perf: hisi: Fix use-after-free when register pmu fails 2023-11-20 11:08:21 +01:00
phy phy: mapphone-mdm6600: Fix pinctrl_pm handling for sleep pins 2023-10-25 11:59:03 +02:00
pinctrl pinctrl: lochnagar: Don't build on MIPS 2024-01-25 14:52:27 -08:00
platform platform/x86: intel-vbtn: Fix missing tablet-mode-switch events 2024-01-25 14:52:29 -08:00
pnp
power power: supply: bq256xx: fix some problem in bq256xx_hw_init 2024-01-25 14:52:50 -08:00
powercap
pps
ps3
ptp ptp: annotate data-race around q->head and q->tail 2023-11-28 16:56:23 +00:00
pwm pwm: jz4740: Don't use dev_err_probe() in .request() 2024-01-25 14:52:48 -08:00
rapidio
ras
regulator regulator/core: Revert "fix kobject release warning and memory leak in regulator_register()" 2023-10-25 11:59:00 +02:00
remoteproc
reset reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning 2024-01-25 14:52:30 -08:00
rpmsg rpmsg: Fix possible refcount leak in rpmsg_register_device_override() 2023-11-08 17:26:44 +01:00
rtc rtc: pcf85363: fix wrong mask/val parameters in regmap_update_bits call 2023-11-20 11:08:27 +01:00
s390 s390/scm: fix virtual vs physical address confusion 2024-01-25 14:52:30 -08:00
sbus
scsi scsi: mpi3mr: Refresh sdev queue depth after controller reset 2024-01-25 14:52:48 -08:00
sh
siox
slimbus
soc soc: qcom: llcc: Fix dis_cap_alloc and retain_on_pc configuration 2024-01-25 14:52:39 -08:00
soundwire soundwire: stream: fix NULL pointer dereference for multi_link 2023-12-20 15:17:41 +01:00
spi spi: sh-msiof: Enforce fixed DTDL for R-Car H3 2024-01-25 14:52:34 -08:00
spmi
ssb
staging net: vlan: introduce skb_vlan_eth_hdr() 2023-12-20 15:17:35 +01:00
target scsi: target: core: Fix deadlock due to recursive locking 2023-10-10 21:59:07 +02:00
tc
tee tee: optee: Fix supplicant based device enumeration 2023-12-13 18:36:38 +01:00
thermal thermal: core: prevent potential string overflow 2023-11-20 11:08:15 +01:00
thunderbolt thunderbolt: Check that lane 1 is in CL0 before enabling lane bonding 2023-10-19 23:05:36 +02:00
tty serial: sc16is7xx: set safe default SPI clock frequency 2024-01-25 14:52:49 -08:00
uio uio: Fix use-after-free in uio_open 2024-01-25 14:52:31 -08:00
usb usb: mon: Fix atomicity violation in mon_bin_vma_fault 2024-01-25 14:52:47 -08:00
vdpa vdpa/mlx5: preserve CVQ vringh index 2023-12-13 18:36:31 +01:00
vfio vfio/type1: fix cap_migration information leak 2023-09-19 12:22:41 +02:00
vhost vhost: Allow null msg.size on VHOST_IOTLB_INVALIDATE 2023-11-08 17:26:36 +01:00
video fbdev: flush deferred work in fb_deferred_io_fsync() 2024-01-25 14:52:48 -08:00
virt
virtio virtio-mmio: fix memory leak of vm_dev 2023-11-08 17:26:36 +01:00
visorbus
vlynq
vme
w1
watchdog watchdog: rti_wdt: Drop runtime pm reference count when watchdog is unused 2024-01-25 14:52:44 -08:00
xen swiotlb-xen: provide the "max_mapping_size" method 2023-12-03 07:31:24 +01:00
zorro
Kconfig
Makefile