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: Tue, 05 May 2026 08:50:48 +1000 Message-ID: In-Reply-To: <20260502115528.530401-1-lgs201920130244@gmail.com> References: <20260502115528.530401-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-05T08:50:48.648719 --- This is a single-patch bugfix series (v3) addressing a real bug: `imx8qxp_p= xl2dpi_get_available_ep_from_port()` returns `ERR_PTR()` on failure, but th= e caller `imx8qxp_pxl2dpi_find_next_bridge()` stores that value in a `__fre= e(device_node)` variable. The `DEFINE_FREE(device_node, ...)` cleanup macro= only checks `if (_T)` before calling `of_node_put()`, so an `ERR_PTR()` (w= hich is non-NULL) will cause `of_node_put()` on a bogus pointer =E2=80=94 a= potential crash or memory corruption. The fix is correct and well-structured: the helper function is refactored t= o return an `int` error code and pass the endpoint node through an output p= arameter, ensuring that `__free(device_node)` variables only ever hold `NUL= L` or a valid `device_node` pointer. Both callers are updated consistently. **Verdict: The patch looks good and should be accepted.** There is one mino= r Fixes tag formatting nit (13-char SHA vs. the standard 12-char), but the = substance of the fix is correct and clean. --- Generated by Claude Code Patch Reviewer