linux/drivers
Uwe Kleine-König e0687fe958 char: tpm: cr50_i2c: Suppress duplicated error message in .remove()
Returning an error value in an i2c remove callback results in an error
message being emitted by the i2c core, but otherwise it doesn't make a
difference. The device goes away anyhow and the devm cleanups are
called.

As tpm_cr50_i2c_remove() emits an error message already and the
additional error message by the i2c core doesn't add any useful
information, change the return value to zero to suppress this error
message.

Note that if i2c_clientdata is NULL, there is something really fishy.
Assuming no memory corruption happened (then all bets are lost anyhow),
tpm_cr50_i2c_remove() is only called after tpm_cr50_i2c_probe() returned
successfully. So there was a tpm chip registered before and after
tpm_cr50_i2c_remove() its privdata is freed but the associated character
device isn't removed. If after that happened userspace accesses the
character device it's likely that the freed memory is accessed. For that
reason the warning message is made a bit more frightening.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
2022-05-23 18:47:49 +03:00
..
accessibility
acpi
amba
android
ata
atm
auxdisplay
base firmware_loader: use kernel credentials when reading firmware 2022-05-06 10:00:03 +02:00
bcma
block ataflop: use a statically allocated error counters 2022-05-08 10:01:48 -07:00
bluetooth
bus - Fix locking when accessing device MSI descriptors 2022-05-01 09:30:47 -07:00
cdrom
char char: tpm: cr50_i2c: Suppress duplicated error message in .remove() 2022-05-23 18:47:49 +03:00
clk clk: at91: generated: consider range when calculating best rate 2022-05-17 12:41:07 -07:00
clocksource
comedi
connector
counter
cpufreq cpufreq: qcom-cpufreq-hw: Clear dcvs interrupts 2022-04-26 12:08:31 +05:30
cpuidle
crypto crypto: qcom-rng - fix infinite loop on requests not multiple of WORD_SZ 2022-05-13 17:13:38 +08:00
cxl
dax
dca
devfreq
dio
dma
dma-buf dma-buf: ensure unique directory name for dmabuf stats 2022-05-13 13:35:10 +02:00
edac
eisa
extcon
firewire firewire: core: extend card->lock in fw_core_handle_bus_reset 2022-04-25 08:01:09 +02:00
firmware
fpga
fsi
gnss
gpio gpio: mvebu/pwm: Refuse requests with inverted polarity 2022-05-20 16:46:56 +02:00
gpu Merge tag 'drm-intel-fixes-2022-05-20' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes 2022-05-21 06:01:57 +10:00
greybus
hid
hsi
hv
hwmon hwmon: (ltq-cputemp) restrict it to SOC_XWAY 2022-05-09 17:27:24 -07:00
hwspinlock
hwtracing
i2c drivers: i2c: thunderx: Allow driver to work with ACPI defined TWSI controllers 2022-05-21 13:41:28 +02:00
i3c
idle intel_idle: Fix SPR C6 optimization 2022-04-27 20:36:47 +02:00
iio
infiniband RDMA/rxe: Change mcg_lock to a _bh lock 2022-05-04 21:29:25 -03:00
input Input updates for v5.18-rc7 2022-05-21 13:58:43 -10:00
interconnect interconnect: Restore sync state by ignoring ipa-virt in provider count 2022-05-03 22:24:21 +03:00
iommu iommu: Make sysfs robust for non-API groups 2022-05-04 15:13:39 +02:00
ipack
irqchip
isdn
leds
macintosh
mailbox
mcb
md block-5.18-2022-04-22 2022-04-23 09:46:44 -07:00
media
memory
memstick
message
mfd
misc eeprom: at25: Use DMA safe buffers 2022-04-24 17:25:10 +02:00
mmc mmc: core: Fix busy polling for MMC_SEND_OP_COND again 2022-05-19 15:46:46 +02:00
most
mtd
mux
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf 2022-05-18 19:34:26 -07:00
nfc nfc: pn533: Fix buggy cleanup order 2022-05-18 13:58:13 +01:00
ntb
nubus
nvdimm
nvme
nvmem
of
opp
parisc
parport
pci pci-v5.18-fixes-1 2022-05-17 13:46:22 -10:00
pcmcia
peci
perf
phy
pinctrl Pin control fixes for the v5.18 series: 2022-05-19 06:02:41 -10:00
platform platform/surface: aggregator: Fix initialization order when compiling as builtin module 2022-05-06 13:05:57 +02:00
pnp
power
powercap
pps
ps3
ptp ptp: ocp: change sysfs attr group handling 2022-05-18 21:44:37 -07:00
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc Revert "clk: sunxi-ng: sun6i-rtc: Add support for H6" 2022-05-17 00:25:57 -07:00
s390 Networking fixes for 5.18-rc7, including fixes from wireless, 2022-05-12 11:51:45 -07:00
sbus
scsi scsi: ufs: core: Fix referencing invalid rsp field 2022-05-19 21:01:02 -04:00
sh
siox
slimbus slimbus: qcom: Fix IRQ check in qcom_slim_probe 2022-05-09 16:00:20 +02:00
soc
soundwire
spi
spmi
ssb
staging
target scsi: target: Fix incorrect use of cpumask_t 2022-05-17 21:42:23 -04:00
tc
tee
thermal thermal: int340x: Mode setting with new OS handshake 2022-05-11 20:08:15 +02:00
thunderbolt
tty fsl_lpuart: Don't enable interrupts too early 2022-05-05 23:00:21 +02:00
uio
usb USB-serial fixes for 5.18-rc7 2022-05-13 08:29:40 +02:00
vdpa vdpa/mlx5: Use consistent RQT size 2022-05-18 12:31:31 -04:00
vfio
vhost Fix double fget() in vhost_net_set_backend() 2022-05-18 12:33:51 -04:00
video Merge remote-tracking branch 'drm/drm-fixes' into drm-misc-fixes 2022-05-11 20:22:22 +02:00
virt
virtio
visorbus
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile