From: Claude Code Review Bot <claude-review@example.com>
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 [thread overview]
Message-ID: <review-overall-20260506142434.643523-1-lgs201920130244@gmail.com> (raw)
In-Reply-To: <20260506142434.643523-1-lgs201920130244@gmail.com>
Overall Series Review
Subject: drm/bridge: imx8qxp-pxl2dpi: avoid ERR_PTR with device_node cleanup
Author: Guangshuo Li <lgs201920130244@gmail.com>
Patches: 2
Reviewed: 2026-05-07T13:23:41.500001
---
This is a single-patch bug fix for a real and valid problem. The `__free(device_node)` cleanup attribute calls `of_node_put()` on any non-NULL pointer, but `imx8qxp_pxl2dpi_get_available_ep_from_port()` returns `ERR_PTR()` values on error. When `imx8qxp_pxl2dpi_find_next_bridge()` stores such an `ERR_PTR()` in a `__free(device_node)` variable and then returns, the cleanup will call `of_node_put()` on the error pointer — 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_node` pointer.
The patch is at v6 and has clearly been through careful review iteration. The approach is sound and the implementation is clean.
**Verdict: This patch looks good and should be accepted.**
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-07 3:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 14:24 [PATCH v6] drm/bridge: imx8qxp-pxl2dpi: avoid ERR_PTR with device_node cleanup Guangshuo Li
2026-05-07 2:20 ` Liu Ying
2026-05-07 3:23 ` Claude Code Review Bot [this message]
2026-05-07 3:23 ` Claude review: " Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-05-06 9:23 [PATCH v5] " Guangshuo Li
2026-05-07 3:48 ` Claude review: " Claude Code Review Bot
2026-05-07 3:48 ` Claude Code Review Bot
2026-05-02 11:55 [PATCH v3] " Guangshuo Li
2026-05-04 22:50 ` Claude review: " Claude Code Review Bot
2026-05-04 22:50 ` Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=review-overall-20260506142434.643523-1-lgs201920130244@gmail.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox