Claude review: drm/bridge: it6505: fix use-after-free in it6505_parse_dt()

Claude Code Review Bot
2026-04-12T03:40:31Z

Overall Series Review

Subject: drm/bridge: it6505: fix use-after-free in it6505_parse_dt()
Author: Wentao Liang <vulab@iscas.ac.cn>
Patches: 1
Reviewed: 2026-04-12T13:40:31.451726

---

This is a single patch claiming to fix a use-after-free in `it6505_parse_dt()`. The claim is that `of_node_put(ep)` is called before `ep` is used inside the `if (ep)` block. While the diagnosis of a real bug is correct — calling `of_node_put()` before using the node is wrong — there is a significant gap in the fix: it only places `of_node_put(ep)` on the `if (ep)` (true) path and **omits it on the `else` path and on early-return/error paths**. However, since `ep` is `NULL` in the `else` branch, `of_node_put(NULL)` is a no-op, so this omission is actually correct behavior (not a leak). The fix is functionally correct.

**Verdict: The patch is correct and fixes a real bug, but is cosmetically imperfect in its commit message framing.**