Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

i3c: master: Remove i3c_device_free_ibi from i3c_device_remove

i3c_device_disable_ibi should be called before i3c_device_free_ibi,
however, a driver using devm actions cannot yield the call before the
bus_type.remove(), requiring to use a .remove method that is usually
discouraged for drivers that uses resources already manage. Since the
only consumer mctp-i3c.c of this method calls both
i3c_device_disable_ibi then i3c_device_free_ibi, remove the call from
the i3c_device_remove (bus_type.remove()).

Signed-off-by: Jorge Marques <jorge.marques@analog.com>
Link: https://patch.msgid.link/20251112-ibi-unsafe-v1-1-d8454db22613@analog.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Jorge Marques and committed by
Alexandre Belloni
5b9481a4 a54b1aeb

-2
-2
drivers/i3c/master.c
··· 334 334 335 335 if (driver->remove) 336 336 driver->remove(i3cdev); 337 - 338 - i3c_device_free_ibi(i3cdev); 339 337 } 340 338 341 339 const struct bus_type i3c_bus_type = {