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:48:12 +1000 Message-ID: In-Reply-To: <20260506092324.635014-1-lgs201920130244@gmail.com> References: <20260506092324.635014-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: 4 Reviewed: 2026-05-07T13:48:12.371028 --- This is a correct and well-targeted single-patch fix for a real bug. The `D= EFINE_FREE(device_node, ...)` cleanup macro (defined in `include/linux/of.h= :138`) checks `if (_T)` before calling `of_node_put(_T)`, but does **not** = filter out `IS_ERR()` values. Since ERR_PTR values are non-NULL, when `imx8= qxp_pxl2dpi_get_available_ep_from_port()` returns an error, the `__free(dev= ice_node)` cleanup would call `of_node_put()` on a bogus kernel pointer =E2= =80=94 a use-after-free / invalid memory access. The fix is minimal and correct: remove the `__free` annotation from `ep`, c= heck `IS_ERR(ep)` before any cleanup can fire, then manually `of_node_put(e= p)` once it's no longer needed. The approach is appropriate for a stable-ta= rgeted fix. **Verdict: Looks good to me. Recommend applying.** --- Generated by Claude Code Patch Reviewer