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/bridge: samsung-dsim: Fix memory leak in error path Date: Wed, 11 Feb 2026 16:53:10 +1000 Message-ID: In-Reply-To: <20260209184115.10937-1-osama.abdelkader@gmail.com> References: <20260209184115.10937-1-osama.abdelkader@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Mailer: Claude Code Patch Reviewer Overall Series Review Subject: drm/bridge: samsung-dsim: Fix memory leak in error path Author: Osama Abdelkader Patches: 2 Reviewed: 2026-02-11T16:53:10.913396 --- This is a single-patch series addressing a memory leak bug in the Samsung DSIM bridge driver. The patch fixes a legitimate resource leak where `drm_bridge_add()` is called early in `samsung_dsim_host_attach()`, but subsequent error paths fail to call the corresponding `drm_bridge_remove()`. The fix implements proper error unwinding using goto labels, following standard kernel patterns. **Strengths:** - Correctly identifies and fixes a real resource leak - Uses standard kernel error handling patterns (goto labels) - Includes appropriate Fixes tag and Cc: stable - Handles both bridge removal and TE IRQ cleanup in error paths - Code movement is minimal and justified (avoids forward declaration) **Areas for improvement:** - Patch versioning format (should use `[PATCH v2]` in subject) - The changelog placement (v2 notes should go after the `---` separator) **Overall assessment:** This is a solid bug fix that should be merged. The technical approach is correct, and the code follows kernel conventions. The only issues are minor formatting/process improvements that were already pointed out by the reviewer. --- --- Generated by Claude Code Patch Reviewer