]> git.baikalelectronics.ru Git - kernel.git/commit
drm/mipi-dsi: Detach devices when removing the host
authorMaxime Ripard <maxime@cerno.tech>
Mon, 11 Jul 2022 17:38:31 +0000 (19:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:22:27 +0000 (13:22 +0200)
commitd2e81b172bc808062606fd8bf3ffea9bb66e89b7
tree6a6d54d4128198749c96fd97b0dbf0afbff25e1f
parent3057f33cc8878e89af424d3ffb6e83bc14478d6f
drm/mipi-dsi: Detach devices when removing the host

[ Upstream commit faed76fc11107cbb5a1a5d7d6dae9d13c9e47d1f ]

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: b1946b21d66a ("drm: Add MIPI DSI bus support")
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220711173939.1132294-2-maxime@cerno.tech
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/drm_mipi_dsi.c