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: renesas: rz-du: mipi_dsi: Fix return path on error Date: Tue, 05 May 2026 09:27:22 +1000 Message-ID: In-Reply-To: <20260501132135.196701-1-chris.brandt@renesas.com> References: <20260501132135.196701-1-chris.brandt@renesas.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Overall Series Review Subject: drm: renesas: rz-du: mipi_dsi: Fix return path on error Author: Chris Brandt Patches: 1 Reviewed: 2026-05-05T09:27:22.127017 --- This is a single-patch series (v3) that fixes an error-handling bug in the = Renesas RZ MIPI DSI probe path. The original code had two problems: 1. **Missing error unwind**: The `dma_alloc_coherent()` call was placed aft= er `mipi_dsi_host_register()`, and on failure it did `return -ENOMEM` direc= tly =E2=80=94 skipping the `err_pm_disable` cleanup label, which means `pm_= runtime_disable()` and `mipi_dsi_host_unregister()` were never called on th= at error path. 2. **Leaked DMA allocation**: Since plain `dma_alloc_coherent()` was used, = any other error path that went through the `err_phy` / `err_pm_disable` lab= els would also leak the DMA buffer (though in practice this was unreachable= since the alloc came last). The fix is clean and correct: switch to `dmam_alloc_coherent()` (device-man= aged) and move it earlier in the probe function =E2=80=94 before `platform_= set_drvdata()` and `pm_runtime_enable()` =E2=80=94 so that on failure, a si= mple `return -ENOMEM` is sufficient (no cleanup needed at that point), and = the buffer is automatically freed on device removal. The corresponding `dma= _free_coherent()` in `remove()` is correctly dropped. The patch has a `Fixes:` tag, a `Reviewed-by` from Biju Das, is on its thir= d revision addressing prior review feedback, and the changelog is well docu= mented. **Recommend: Accept.** --- Generated by Claude Code Patch Reviewer