linux-stable/drivers/i2c
Jamie Iles b8090a84d7 i2c: acpi: fix resource leak in reconfiguration device addition
[ Upstream commit 6558b646ce ]

acpi_i2c_find_adapter_by_handle() calls bus_find_device() which takes a
reference on the adapter which is never released which will result in a
reference count leak and render the adapter unremovable.  Make sure to
put the adapter after creating the client in the same manner that we do
for OF.

Fixes: 525e6fabea ("i2c / ACPI: add support for ACPI reconfigure notifications")
Signed-off-by: Jamie Iles <quic_jiles@quicinc.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
[wsa: fixed title]
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-10-17 10:08:33 +02:00
..
algos i2c: algo: pca: Reapply i2c bus settings after reset 2020-09-23 10:46:34 +02:00
busses i2c: mt65xx: fix IRQ check 2021-09-22 11:45:22 +02:00
muxes i2c: mux: demux-pinctrl: Fix an error handling path in 'i2c_demux_pinctrl_probe()' 2020-05-27 16:42:52 +02:00
i2c-boardinfo.c
i2c-core-acpi.c i2c: acpi: fix resource leak in reconfiguration device addition 2021-10-17 10:08:33 +02:00
i2c-core-base.c i2c: core: Disable client irq on reboot/shutdown 2021-07-20 16:17:51 +02:00
i2c-core-of.c i2c: core: fix use after free in of_i2c_notify 2019-12-17 20:37:32 +01:00
i2c-core-slave.c i2c: slave: add sanity check when unregistering 2020-08-21 09:47:59 +02:00
i2c-core-smbus.c
i2c-core.h
i2c-dev.c i2c: dev: zero out array used for i2c reads from userspace 2021-08-26 08:37:00 -04:00
i2c-mux.c
i2c-slave-eeprom.c
i2c-smbus.c
i2c-stub.c
Kconfig
Makefile