drm/tve200: Fix probe cleanup after register failure
authorMyeonghun Pak <mhun512@gmail.com>
Fri, 24 Apr 2026 12:40:39 +0000 (21:40 +0900)
committerLinus Walleij <linusw@kernel.org>
Tue, 5 May 2026 09:16:39 +0000 (11:16 +0200)
commit93dd05a23b5bc9c0d6be331b10eed876b8b9c1f1
tree0916704502fbddf484de1ed0b84ec9df0eeb7590
parentd4c14903bf5e28e740516c4fbb7db01e0dedf3af
drm/tve200: Fix probe cleanup after register failure

tve200_modeset_init() creates a panel bridge and initializes the DRM
mode config before tve200_probe() registers the DRM device. If
drm_dev_register() fails, probe returns an error and the driver's remove
callback is not called, so those modeset resources are left behind.

Unwind the panel bridge and mode config on that failure path before
disabling the clock and dropping the DRM device reference.

Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260424124118.38649-1-mhun512@gmail.com
drivers/gpu/drm/tve200/tve200_drv.c