From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/bridge: th1520-dw-hdmi: Fix error check on dw_hdmi_probe() return value
Date: Sun, 22 Mar 2026 03:24:58 +1000 [thread overview]
Message-ID: <review-patch1-20260321-th1520-v1-1-ec877197770d@gmail.com> (raw)
In-Reply-To: <20260321-th1520-v1-1-ec877197770d@gmail.com>
Patch Review
**Verdict: Correct, good fix.**
The original code was:
```c
hdmi->dw_hdmi = dw_hdmi_probe(pdev, plat_data);
if (IS_ERR(hdmi))
return PTR_ERR(hdmi);
```
This is wrong because `hdmi` is the `struct th1520_hdmi *` allocated earlier via `devm_kzalloc()` — it's always a valid kernel pointer, never an ERR_PTR. The error encoding from `dw_hdmi_probe()` is stored in `hdmi->dw_hdmi`, so `IS_ERR(hdmi)` would always be false, causing the driver to silently proceed with an error pointer stored in `hdmi->dw_hdmi`, leading to crashes later.
The fix correctly checks `hdmi->dw_hdmi`:
```c
if (IS_ERR(hdmi->dw_hdmi))
return PTR_ERR(hdmi->dw_hdmi);
```
No issues. Fixes tag and commit message are accurate.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-21 17:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 19:12 [PATCH 0/2] drm/bridge: th1520-dw-hdmi: Two fixes Felix Gu
2026-03-20 19:12 ` [PATCH 1/2] drm/bridge: th1520-dw-hdmi: Fix error check on dw_hdmi_probe() return value Felix Gu
2026-03-21 17:24 ` Claude Code Review Bot [this message]
2026-03-20 19:12 ` [PATCH 2/2] drm/bridge: th1520-dw-hdmi: Fix remove() callback Felix Gu
2026-03-21 17:24 ` Claude review: " Claude Code Review Bot
2026-03-21 5:05 ` [PATCH 0/2] drm/bridge: th1520-dw-hdmi: Two fixes Icenowy Zheng
2026-03-21 17:24 ` Claude review: " 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-patch1-20260321-th1520-v1-1-ec877197770d@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