Skip to content

Commit

Permalink
drm/mipi-dsi: Detach devices when removing the host
Browse files Browse the repository at this point in the history
Whenever the MIPI-DSI host is unregistered, the code of
mipi_dsi_host_unregister() loops over every device currently found on that
bus and will unregister it.

However, it doesn't detach it from the bus first, which leads to all kind
of resource leaks if the host wants to perform some clean up whenever a
device is detached.

Fixes: 068a002 ("drm: Add MIPI DSI bus support")
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
  • Loading branch information
mripard authored and intel-lab-lkp committed Jul 8, 2022
1 parent b3e10c2 commit a6f58a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/drm_mipi_dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ static int mipi_dsi_remove_device_fn(struct device *dev, void *priv)
{
struct mipi_dsi_device *dsi = to_mipi_dsi_device(dev);

mipi_dsi_detach(dsi);
mipi_dsi_device_unregister(dsi);

return 0;
Expand Down

0 comments on commit a6f58a7

Please sign in to comment.