linux-stable/drivers
Gaosheng Cui 3650943bab pinctrl: thunderbay: fix possible memory leak in thunderbay_build_functions()
[ Upstream commit 83e1bcaf8c ]

The thunderbay_add_functions() will free memory of thunderbay_funcs
when everything is ok, but thunderbay_funcs will not be freed when
thunderbay_add_functions() fails, then there will be a memory leak,
so we need to add kfree() when thunderbay_add_functions() fails to
fix it.

In addition, doing some cleaner works, moving kfree(funcs) from
thunderbay_add_functions() to thunderbay_build_functions().

Fixes: 12422af819 ("pinctrl: Add Intel Thunder Bay pinctrl driver")
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Reviewed-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20221129120126.1567338-1-cuigaosheng1@huawei.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:26:09 +01:00
..
accessibility speakup: replace utils' u_char with unsigned char 2022-11-26 09:27:45 +01:00
acpi ACPICA: Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage() 2022-12-31 13:25:46 +01:00
amba
android binder: validate alloc->mm in ->mmap() handler 2022-12-02 17:42:59 +01:00
ata ata: libata: fix NCQ autosense logic 2022-12-31 13:25:50 +01:00
atm
auxdisplay
base regmap-irq: Use the new num_config_regs property in regmap_add_irq_chip_fwnode 2022-12-31 13:25:56 +01:00
bcma
block drbd: destroy workqueue when drbd device was freed 2022-12-31 13:26:02 +01:00
bluetooth Bluetooth: btusb: Add debug message for CSR controllers 2022-12-14 11:40:52 +01:00
bus bus: ixp4xx: Don't touch bit 7 on IXP42x 2022-12-02 17:43:11 +01:00
cdrom
char ipmi: kcs: Poll OBF briefly to reduce OBE latency 2022-12-31 13:25:50 +01:00
clk clk: qcom: clk-krait: fix wrong div2 functions 2022-12-31 13:26:08 +01:00
clocksource clocksource/drivers/timer-ti-dm: Fix missing clk_disable_unprepare in dmtimer_systimer_init_clock() 2022-12-31 13:25:46 +01:00
comedi
connector
counter counter: 104-quad-8: Fix race getting function mode and direction 2022-11-04 00:00:23 +09:00
cpufreq cpufreq: amd_freq_sensitivity: Add missing pci_dev_put() 2022-12-31 13:25:45 +01:00
cpuidle cpuidle: dt: Return the correct numbers of parsed idle states 2022-12-31 13:25:42 +01:00
crypto crypto: ccp - Add a quirk to firmware update 2022-12-14 11:40:50 +01:00
cxl cxl/pmem: Use size_add() against integer overflow 2022-11-26 09:27:21 +01:00
dax devdax: Fix soft-reservation memory description 2022-09-24 18:05:53 -07:00
dca
devfreq
dio
dma dmaengine: at_hdmac: Check return code of dma_async_device_register 2022-11-16 10:04:14 +01:00
dma-buf dma-buf: Use dma_fence_unwrap_for_each when importing fences 2022-12-02 17:43:10 +01:00
edac EDAC/i10nm: fix refcount leak in pci_get_dev_wrapper() 2022-12-31 13:25:44 +01:00
eisa
extcon
firewire
firmware firmware: ti_sci: Fix polled mode during system suspend 2022-12-31 13:25:36 +01:00
fpga fpga: m10bmc-sec: Fix kconfig dependencies 2022-12-02 17:43:12 +01:00
fsi fsi: master-ast-cf: Fix missing of_node_put in fsi_master_acf_probe 2022-10-21 12:39:26 +02:00
gnss
gpio gpio/rockchip: fix refcount leak in rockchip_gpiolib_register() 2022-12-14 11:41:02 +01:00
gpu drm/i915/bios: fix a memory leak in generate_lfp_data_ptrs 2022-12-31 13:26:05 +01:00
greybus
hid HID: hid-sensor-custom: set fixed size for custom attributes 2022-12-31 13:26:00 +01:00
hsi HSI: ssi_protocol: fix potential resource leak in ssip_pn_open() 2022-10-21 12:39:23 +02:00
hte
hv Drivers: hv: vmbus: fix possible memory leak in vmbus_device_register() 2022-12-02 17:43:06 +01:00
hwmon hwmon: (jc42) Restore the min/max/critical temperatures on resume 2022-12-31 13:26:08 +01:00
hwspinlock hwspinlock: qcom: correct MMIO max register for newer SoCs 2022-11-16 10:03:50 +01:00
hwtracing coresight: cti: Fix hang in cti_disable_hw() 2022-11-04 00:00:22 +09:00
i2c i2c: imx: Only DMA messages with I2C_M_DMA_SAFE flag set 2022-12-08 11:30:21 +01:00
i3c
idle
iio iio: light: rpr0521: add missing Kconfig dependencies 2022-12-08 11:30:14 +01:00
infiniband RDMA/efa: Add EFA 0xefa2 PCI ID 2022-11-26 09:27:18 +01:00
input Input: wistron_btns - disable on UML 2022-12-31 13:26:06 +01:00
interconnect
iommu iommu/vt-d: Fix PCI device refcount leak in dmar_dev_scope_init() 2022-12-08 11:30:21 +01:00
ipack
irqchip irqchip/loongson-liointc: Fix improper error handling in liointc_init() 2022-12-31 13:25:44 +01:00
isdn mISDN: fix misuse of put_device() in mISDN_register_device() 2022-11-26 09:27:35 +01:00
leds leds: lm3601x: Don't use mutex after it was destroyed 2022-10-21 12:38:02 +02:00
macintosh
mailbox mailbox: pcc: Reset pcc_chan_count to zero in case of PCC probe failure 2022-12-31 13:25:43 +01:00
mcb
md dm: track per-add_disk holder relations in DM 2022-12-31 13:25:59 +01:00
media media: ov5640: set correct default link frequency 2022-12-31 13:26:09 +01:00
memory memory: renesas-rpc-if: Clear HS bit during hardware initialization 2022-12-31 13:25:36 +01:00
memstick
message
mfd mfd: da9061: Fix Failed to set Two-Wire Bus Mode. 2022-10-21 12:38:52 +02:00
misc misc/vmw_vmci: fix an infoleak in vmci_host_do_receive_datagram() 2022-11-26 09:27:51 +01:00
mmc mmc: sdhci: Fix voltage switch delay 2022-12-08 11:30:20 +01:00
most
mtd mtd: maps: pxa2xx-flash: fix memory leak in probe 2022-12-31 13:26:02 +01:00
mux
net mt76: mt7915: Fix PCI device refcount leak in mt7915_pci_init_hif2() 2022-12-31 13:26:07 +01:00
nfc nfc: st-nci: fix incorrect sizing calculations in EVT_TRANSACTION 2022-12-02 17:43:09 +01:00
ntb
nubus
nvdimm Merge branch 'for-6.0/dax' into libnvdimm-fixes 2022-09-24 18:14:12 -07:00
nvme nvme: return err on nvme_init_non_mdts_limits fail 2022-12-31 13:25:58 +01:00
nvmem nvmem: rmem: Fix return value check in rmem_read() 2022-12-08 11:30:15 +01:00
of of: property: decrement node refcount in of_fwnode_get_reference_args() 2022-12-08 11:30:15 +01:00
opp
parisc parisc: Export iosapic_serial_irq() symbol for serial port driver 2022-11-10 18:17:35 +01:00
parport parport_pc: Avoid FIFO port location truncation 2022-11-26 09:27:30 +01:00
pci PCI: mt7621: Add sentinel to quirks table 2022-12-21 17:41:11 +01:00
pcmcia
peci
perf drivers/perf: hisi: Fix some event id for hisi-pcie-pmu 2022-12-31 13:25:40 +01:00
phy phy: qcom-qmp-combo: fix NULL-deref on runtime resume 2022-11-16 10:04:09 +01:00
pinctrl pinctrl: thunderbay: fix possible memory leak in thunderbay_build_functions() 2022-12-31 13:26:09 +01:00
platform platform/mellanox: mlxbf-pmc: Fix event typo 2022-12-31 13:25:48 +01:00
pnp PNP: fix name memory leak in pnp_alloc_dev() 2022-12-31 13:25:43 +01:00
power power: supply: ab8500: Defer thermal zone probe 2022-12-02 17:43:02 +01:00
powercap powercap: intel_rapl: fix UBSAN shift-out-of-bounds issue 2022-10-21 12:39:04 +02:00
pps
ps3
ptp
pwm
rapidio rapidio: devices: fix missing put_device in mport_cdev_open 2022-12-31 13:25:48 +01:00
ras
regulator regulator: core: fix resource leak in regulator_register() 2022-12-31 13:26:08 +01:00
remoteproc remoteproc: Harden rproc_handle_vdev() against integer overflow 2022-10-21 12:38:45 +02:00
reset reset: npcm: fix iprst2 and iprst4 setting 2022-09-22 17:48:35 +02:00
rpmsg rpmsg: char: Avoid double destroy of default endpoint 2022-10-21 12:37:53 +02:00
rtc rtc: cmos: fix build on non-ACPI platforms 2022-12-19 12:41:01 +01:00
s390 s390/qeth: fix use-after-free in hsci 2022-12-14 11:41:06 +01:00
sbus
scsi scsi: iscsi: Fix possible memory leak when device_register() failed 2022-12-02 17:43:16 +01:00
sh
siox siox: fix possible memory leak in siox_device_add() 2022-11-26 09:27:30 +01:00
slimbus slimbus: stream: correct presence rate frequencies 2022-11-26 09:27:45 +01:00
soc soc: apple: rtkit: Stop casting function pointer signatures 2022-12-31 13:25:40 +01:00
soundwire soundwire: intel: Initialize clock stop timeout 2022-12-14 11:40:51 +01:00
spi spi: spidev: mask SPI_CS_HIGH in SPI_IOC_RD_MODE 2022-12-31 13:26:06 +01:00
spmi spmi: pmic-arb: correct duplicate APID to PPID mapping logic 2022-10-21 12:38:53 +02:00
ssb
staging media: imx: imx7-media-csi: Clear BIT_MIPI_DOUBLE_CMPNT for <16b formats 2022-12-31 13:26:02 +01:00
target scsi: target: tcm_loop: Fix possible name leak in tcm_loop_setup_hba_bus() 2022-11-26 09:27:53 +01:00
tc
tee tee: optee: fix possible memory leak in optee_register_device() 2022-12-02 17:43:03 +01:00
thermal thermal: core: fix some possible name leaks in error paths 2022-12-31 13:25:44 +01:00
thunderbolt thunderbolt: Add DP OUT resource when DP tunnel is discovered 2022-11-16 10:03:48 +01:00
tty Revert "tty: n_gsm: replace kicktimer with delayed_work" 2022-12-02 17:43:14 +01:00
ufs
uio
usb usb: musb: remove extra check in musb_gadget_vbus_draw 2022-12-31 13:25:34 +01:00
vdpa vdpa/mlx5: Fix MQ to support non power of two num queues 2022-09-27 18:32:45 -04:00
vfio vfio: Split the register_device ops call into functions 2022-11-26 09:27:52 +01:00
vhost vhost/vsock: Use kvmalloc/kvfree for larger packets. 2022-10-21 12:38:19 +02:00
video fbcon: Use kzalloc() in fbcon_prepare_logo() 2022-12-14 11:40:48 +01:00
virt virt/sev-guest: Add a MODULE_ALIAS 2022-12-31 13:25:56 +01:00
virtio
vlynq
w1
watchdog
xen xen/privcmd: Fix a possible warning in privcmd_ioctl_mmap_resource() 2022-12-31 13:25:46 +01:00
zorro
Kconfig
Makefile