From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/bridge: th1520-dw-hdmi: Fix remove() callback
Date: Sun, 22 Mar 2026 03:24:58 +1000 [thread overview]
Message-ID: <review-patch2-20260321-th1520-v1-2-ec877197770d@gmail.com> (raw)
In-Reply-To: <20260321-th1520-v1-2-ec877197770d@gmail.com>
Patch Review
**Verdict: Correct, good fix.**
The original code was:
```c
struct dw_hdmi *hdmi = platform_get_drvdata(pdev);
dw_hdmi_remove(hdmi);
```
But `platform_set_drvdata(pdev, hdmi)` in probe stores a `struct th1520_hdmi *`, not a `struct dw_hdmi *`. Casting the wrong type to `struct dw_hdmi *` and passing it to `dw_hdmi_remove()` would result in operating on garbage data — likely memory corruption or a crash on module removal.
The fix correctly retrieves the proper type and dereferences the inner pointer:
```c
struct th1520_hdmi *hdmi = platform_get_drvdata(pdev);
dw_hdmi_remove(hdmi->dw_hdmi);
```
No issues. Both patches are straightforward, well-described, and suitable for merge.
---
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 review: " Claude Code Review Bot
2026-03-20 19:12 ` [PATCH 2/2] drm/bridge: th1520-dw-hdmi: Fix remove() callback Felix Gu
2026-03-21 17:24 ` Claude Code Review Bot [this message]
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-patch2-20260321-th1520-v1-2-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