[PATCH v2] drm/meson: clean up KMS polling on register failure
Myeonghun Pak
mhun512 at gmail.com
Tue Aug 4 08:08:02 PDT 2026
meson_drv_bind_master() starts the KMS polling helper before registering
the DRM device. If drm_dev_register() fails, probe unwinds the IRQ and
DRM device without stopping the polling helper.
Call drm_kms_helper_poll_fini() on that failure path before freeing the
IRQ.
This issue was identified during our ongoing static-analysis research while
reviewing kernel code.
Fixes: bbbe775ec5b5 ("drm: Add support for Amlogic Meson Graphic Controller")
Cc: stable at vger.kernel.org
Co-developed-by: Ijae Kim <ae878000 at gmail.com>
Signed-off-by: Ijae Kim <ae878000 at gmail.com>
Signed-off-by: Myeonghun Pak <mhun512 at gmail.com>
Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>
---
Changes in v2:
- Avoid the unused uninstall_irq label reported by the kernel test robot.
- Link to v1: https://lore.kernel.org/r/20260524160657.17802-1-mhun512@gmail.com
drivers/gpu/drm/meson/meson_drv.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
index 49ff9f1f16..bcc36f2cdc 100644
--- a/drivers/gpu/drm/meson/meson_drv.c
+++ b/drivers/gpu/drm/meson/meson_drv.c
@@ -351,8 +351,10 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
platform_set_drvdata(pdev, priv);
ret = drm_dev_register(drm, 0);
- if (ret)
+ if (ret) {
+ drm_kms_helper_poll_fini(drm);
goto uninstall_irq;
+ }
drm_client_setup(drm, NULL);
--
2.47.1
More information about the linux-amlogic
mailing list