linux-stable/drivers
Uwe Kleine-König afa39e6e2b crypto: stm32/crc32 - Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

The driver adapted here suffered from this wrong assumption and had an
error paths resulting in resource leaks.

If pm_runtime_get() fails, the other resources held by the device must
still be freed. Only clk_disable() should be skipped as the
pm_runtime_get() failed to call clk_enable().

After this change the remove function returns zero unconditionally and
can trivially be converted to the prototype required for .remove_new().

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2023-10-27 18:04:27 +08:00
..
accel
accessibility
acpi
amba
android
ata SCSI misc on 20230909 2023-09-09 12:01:33 -07:00
atm
auxdisplay
base
bcma
block block-6.6-2023-09-08 2023-09-08 21:39:54 -07:00
bluetooth
bus
cache
cdrom
cdx
char hwrng: n2 - Use device_get_match_data() 2023-10-13 18:31:07 +08:00
clk
clocksource
comedi
connector
counter
cpufreq
cpuidle
crypto crypto: stm32/crc32 - Convert to platform remove callback returning void 2023-10-27 18:04:27 +08:00
cxl
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware RISC-V Patches for the 6.6 Merge Window, Part 2 (try 2) 2023-09-09 14:25:11 -07:00
fpga
fsi
genpd
gnss
gpio
gpu drm ci for 6.6-rc1 2023-09-10 11:55:26 -07:00
greybus
hid
hsi
hte
hv
hwmon
hwspinlock
hwtracing
i2c
i3c
idle
iio
infiniband
input
interconnect
iommu
ipack
irqchip
isdn
leds
macintosh
mailbox
mcb
md
media media: dvb: symbol fixup for dvb_attach() 2023-09-09 08:15:11 +01:00
memory
memstick
message
mfd
misc
mmc
most
mtd
mux
net chelsio: Do not include crypto/algapi.h 2023-09-15 18:30:43 +08:00
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
opp
parisc
parport
pci pci-v6.6-fixes-1 2023-09-09 11:35:28 -07:00
pcmcia
peci
perf arm64 fixes for -rc1 2023-09-08 12:48:37 -07:00
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390 block-6.6-2023-09-08 2023-09-08 21:39:54 -07:00
sbus
scsi SCSI misc on 20230909 2023-09-09 12:01:33 -07:00
sh
siox
slimbus
soc soc: renesas: Kconfig: For ARCH_R9A07G043 select the required configs if dependencies are met 2023-09-08 11:25:29 -07:00
soundwire
spi
spmi
ssb
staging media: dvb: symbol fixup for dvb_attach() 2023-09-09 08:15:11 +01:00
target
tc
tee
thermal
thunderbolt
tty
ufs
uio
usb
vdpa
vfio
vhost
video
virt
virtio
vlynq
w1
watchdog
xen
zorro
Kconfig
Makefile