]> Gentwo Git Trees - linux/.git/commitdiff
i3c: master: Remove i3c_device_free_ibi from i3c_device_remove
authorJorge Marques <jorge.marques@analog.com>
Wed, 12 Nov 2025 21:30:00 +0000 (22:30 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 28 Nov 2025 23:25:40 +0000 (00:25 +0100)
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>
drivers/i3c/master.c

index 66513a27e6e776d251203b286bcaecb9d8fc67b9..a0fe00e2487c890d5bc7f1316daa4041e66edd5c 100644 (file)
@@ -334,8 +334,6 @@ static void i3c_device_remove(struct device *dev)
 
        if (driver->remove)
                driver->remove(i3cdev);
-
-       i3c_device_free_ibi(i3cdev);
 }
 
 const struct bus_type i3c_bus_type = {