Skip to content

i2c: acpi: fix resource leak in reconfiguration device addition

Charles Mirabile requested to merge cmirabil/centos-stream-9:i2c_bug into main

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2047466

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.

Signed-off-by: Charles Mirabile cmirabil@redhat.com

Edited by Charles Mirabile

Merge request reports