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: imx8qxp-pxl2dpi: avoid ERR_PTR with device_node cleanup Date: Thu, 07 May 2026 13:23:41 +1000 Message-ID: In-Reply-To: <20260506142434.643523-1-lgs201920130244@gmail.com> References: <20260506142434.643523-1-lgs201920130244@gmail.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/bridge: imx8qxp-pxl2dpi: avoid ERR_PTR with device_node cleanup Author: Guangshuo Li Patches: 2 Reviewed: 2026-05-07T13:23:41.500001 --- This is a single-patch bug fix for a real and valid problem. The `__free(de= vice_node)` cleanup attribute calls `of_node_put()` on any non-NULL pointer= , but `imx8qxp_pxl2dpi_get_available_ep_from_port()` returns `ERR_PTR()` va= lues on error. When `imx8qxp_pxl2dpi_find_next_bridge()` stores such an `ER= R_PTR()` in a `__free(device_node)` variable and then returns, the cleanup = will call `of_node_put()` on the error pointer =E2=80=94 corrupting memory = or causing a crash. The fix is correct and well-designed: change the helper to return `int` and= pass the endpoint node via an output parameter initialized to `NULL`. This= ensures the cleanup variable only ever holds `NULL` or a valid `device_nod= e` pointer. The patch is at v6 and has clearly been through careful review iteration. T= he approach is sound and the implementation is clean. **Verdict: This patch looks good and should be accepted.** --- Generated by Claude Code Patch Reviewer