From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm: rcar-du: Fix crash when no CMM is available
Date: Sun, 12 Apr 2026 12:28:45 +1000 [thread overview]
Message-ID: <review-patch1-20260408124205.1962448-1-laurent.pinchart+renesas@ideasonboard.com> (raw)
In-Reply-To: <20260408124205.1962448-1-laurent.pinchart+renesas@ideasonboard.com>
Patch Review
**Correctness: Good.** All three sites are correctly changed from `rcrtc->cmm->dev` to `rcrtc->cmm`. Looking at the initialization code at line 1302-1304:
```c
/* CMM might be disabled for this CRTC. */
if (rcdu->cmms[swindex].dev) {
rcrtc->cmm = &rcdu->cmms[swindex];
```
`rcrtc->cmm` is only set when the corresponding `cmms[].dev` is non-NULL, which means if `rcrtc->cmm` is non-NULL, then `rcrtc->cmm->dev` is guaranteed non-NULL. So testing `rcrtc->cmm` is both sufficient and correct — the two conditions are semantically equivalent when `cmm` is non-NULL, and only the new form is safe when `cmm` is NULL.
**Site 1 (line 516):** `rcar_du_cmm_setup()` — the early return guard. After the fix, `rcrtc->cmm->dev` is still used on line 522 in `rcar_cmm_setup(rcrtc->cmm->dev, &cmm_config)`, which is safe because the NULL check now correctly gates it.
**Site 2 (line 670):** `rcar_du_crtc_stop()` — guards the `rcar_cmm_disable(rcrtc->cmm->dev)` call on the next line. Correct.
**Site 3 (line 729):** `rcar_du_crtc_atomic_enable()` — guards the `rcar_cmm_enable(rcrtc->cmm->dev)` call. Correct.
**No issues found.** The commit message is clear, the Fixes tag correctly identifies the offending commit, it has a Tested-by from the reporter, and the fix is the minimal correct change. Good to merge.
---
Generated by Claude Code Patch Reviewer
prev parent reply other threads:[~2026-04-12 2:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 12:42 [PATCH] drm: rcar-du: Fix crash when no CMM is available Laurent Pinchart
2026-04-10 5:20 ` Tomi Valkeinen
2026-04-12 2:28 ` Claude review: " Claude Code Review Bot
2026-04-12 2:28 ` Claude Code Review Bot [this message]
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-20260408124205.1962448-1-laurent.pinchart+renesas@ideasonboard.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