linux-stable/drivers
Yang Yingliang 6e63153db5 siox: fix possible memory leak in siox_device_add()
If device_register() returns error in siox_device_add(),
the name allocated by dev_set_name() need be freed. As
comment of device_register() says, it should use put_device()
to give up the reference in the error path. So fix this
by calling put_device(), then the name can be freed in
kobject_cleanup(), and sdevice is freed in siox_device_release(),
set it to null in error path.

Fixes: bbecb07fa0 ("siox: new driver framework for eckelmann SIOX")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221104021334.618189-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-09 15:40:14 +01:00
..
accessibility speakup: replace utils' u_char with unsigned char 2022-11-09 15:25:24 +01:00
acpi ACPI and device properties fixes for 6.1-rc3 2022-10-28 16:48:29 -07:00
amba
android
ata
atm
auxdisplay
base ACPI and device properties fixes for 6.1-rc3 2022-10-28 16:48:29 -07:00
bcma
block block-6.1-2022-10-28 2022-10-29 18:06:52 -07:00
bluetooth
bus
cdrom
char random: use arch_get_random*_early() in random_init() 2022-10-29 00:24:03 +02:00
clk
clocksource
comedi
connector
counter counter: 104-quad-8: Fix race getting function mode and direction 2022-10-23 20:39:26 -04:00
cpufreq cpufreq: intel_pstate: hybrid: Use known scaling factor for P-cores 2022-10-25 15:09:23 +02:00
cpuidle
crypto
cxl
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware
fpga
fsi
gnss
gpio
gpu drm-misc-fixes for v6.1-rc3: 2022-10-28 13:00:15 +10:00
greybus
hid
hsi
hte
hv
hwmon - Use the correct CPU capability clearing function on the error path in 2022-10-23 10:01:34 -07:00
hwspinlock
hwtracing coresight: cti: Fix hang in cti_disable_hw() 2022-10-25 19:08:07 +02:00
i2c
i3c
idle
iio iio: imu: bno055: uninitialized variable bug in bno055_trigger_handler() 2022-11-01 08:48:13 +00:00
infiniband
input
interconnect
iommu
ipack
irqchip
isdn
leds leds: simatic-ipc-leds-gpio: fix incorrect LED to GPIO mapping 2022-10-24 11:32:10 +02:00
macintosh
mailbox
mcb
md
media media: vivid: set num_in/outputs to 0 if not supported 2022-10-25 16:43:34 +01:00
memory
memstick
message
mfd Revert "mfd: syscon: Remove repetition of the regmap_get_val_endian()" 2022-10-23 12:04:56 -07:00
misc misc/vmw_vmci: fix an infoleak in vmci_host_do_receive_datagram() 2022-11-09 15:40:03 +01:00
mmc mmc: sdhci_am654: 'select', not 'depends' REGMAP_MMIO 2022-10-26 11:48:03 +02:00
most
mtd
mux
net net: enetc: survive memory pressure without crashing 2022-10-27 11:32:25 -07:00
nfc
ntb
nubus
nvdimm
nvme block-6.1-2022-10-28 2022-10-29 18:06:52 -07:00
nvmem
of
opp
parisc
parport
pci
pcmcia
peci
perf
phy
pinctrl
platform LoongArch fixes for v6.1-rc3 2022-10-30 09:44:06 -07:00
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390 s390/vfio-ap: Fix memory allocation for mdev_types array 2022-10-26 14:47:31 +02:00
sbus
scsi SCSI fixes on 20221028 2022-10-29 18:12:45 -07:00
sh
siox siox: fix possible memory leak in siox_device_add() 2022-11-09 15:40:14 +01:00
slimbus
soc
soundwire
spi spi: Fixes for v6.1 2022-10-26 17:38:46 -07:00
spmi
ssb
staging
target
tc
tee
thermal
thunderbolt
tty
ufs
uio
usb fbdev fixes for kernel 6.1-rc3: 2022-10-30 11:31:14 -07:00
vdpa
vfio
vhost
video fbdev fixes for kernel 6.1-rc3: 2022-10-30 11:31:14 -07:00
virt
virtio
vlynq
w1
watchdog
xen
zorro
Kconfig
Makefile