From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/loongson: use managed KMS polling Date: Sat, 16 May 2026 14:17:59 +1000 Message-ID: In-Reply-To: <20260512063657.53100-1-mhun512@gmail.com> References: <20260512063657.53100-1-mhun512@gmail.com> <20260512063657.53100-1-mhun512@gmail.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Analysis of the problem:** Looking at the current `lsdc_pci_probe()` (line 296), `drm_kms_helper_poll_= init(ddev)` is called, but there are three subsequent failure paths (lines = 300, 309, 316) that all `return ret` without finalizing polling. The `lsdc_= pci_remove()` function (line 324-330) also lacks a `drm_kms_helper_poll_fin= i()` call: ```c static void lsdc_pci_remove(struct pci_dev *pdev) { struct drm_device *ddev =3D pci_get_drvdata(pdev); drm_dev_unregister(ddev); drm_atomic_helper_shutdown(ddev); } ``` **The fix:** ```diff - drm_kms_helper_poll_init(ddev); + drmm_kms_helper_poll_init(ddev); ``` This is the right approach. The managed function internally calls `drm_kms_= helper_poll_init()` and then registers a cleanup action via `drmm_add_actio= n_or_reset()`, so no manual `drm_kms_helper_poll_fini()` calls are needed i= n error paths or remove/shutdown. **No issues found.** The function signature is `void drmm_kms_helper_poll_i= nit(struct drm_device *dev)` =E2=80=94 same as the non-managed version =E2= =80=94 so the one-line substitution is a complete fix. The Fixes tag and Cc: stable are appropriate since this is a real resource = leak present since the driver was introduced. **Reviewed-by recommendation:** This patch is ready to merge. --- Generated by Claude Code Patch Reviewer