diff options
author | Jamie Iles <quic_jiles@quicinc.com> | 2021-09-22 17:57:18 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-13 10:10:52 +0200 |
commit | 3d9d458a8aaafa47268ea4f1b4114a9f12927989 (patch) | |
tree | e9e7f63806c9cda0f4fbf384f3eae3c8f5d21971 /drivers/i2c/i2c-slave-eeprom.c | |
parent | 60ad4cde0ad28921f9ea25b0201c774b95ffa4b4 (diff) | |
download | linux-stable-3d9d458a8aaafa47268ea4f1b4114a9f12927989.tar.gz linux-stable-3d9d458a8aaafa47268ea4f1b4114a9f12927989.tar.bz2 linux-stable-3d9d458a8aaafa47268ea4f1b4114a9f12927989.zip |
i2c: acpi: fix resource leak in reconfiguration device addition
[ Upstream commit 6558b646ce1c2a872fe1c2c7cb116f05a2c1950f ]
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: 525e6fabeae2 ("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>
Diffstat (limited to 'drivers/i2c/i2c-slave-eeprom.c')
0 files changed, 0 insertions, 0 deletions