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/panel: lg-sw43408: remove panel on DSI attach failure Date: Thu, 23 Apr 2026 10:12:25 +1000 Message-ID: In-Reply-To: <20260420073945.65849-1-mhun512@gmail.com> References: <20260420073945.65849-1-mhun512@gmail.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: drm/panel: lg-sw43408: remove panel on DSI attach failure Author: Myeonghun Pak Patches: 2 Reviewed: 2026-04-23T10:12:25.537212 --- This is a single-patch fix for a real resource leak in the LG SW43408 panel driver. When `mipi_dsi_attach()` fails during probe, `drm_panel_add()` has already been called (inside `sw43408_add()`), but `sw43408_remove()` is never invoked because probe failed. This leaves a stale entry in the global DRM panel list. The fix correctly unwinds by calling `drm_panel_remove()` on the attach failure path. The analysis is sound: `devm_drm_panel_alloc()` handles `drm_panel_put()` via devres, but `drm_panel_add()`/`drm_panel_remove()` is a separate pairing that is not automatically managed. All other resources acquired in `sw43408_add()` (regulators, GPIO, backlight) use `devm_` allocators and need no explicit cleanup. **Verdict: The patch is correct and should be accepted.** --- Generated by Claude Code Patch Reviewer