From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/bridge: stm_lvds: Do not fail atomic_check on disabled connector
Date: Sun, 12 Apr 2026 11:47:57 +1000 [thread overview]
Message-ID: <review-patch1-20260409024928.344010-1-marex@nabladev.com> (raw)
In-Reply-To: <20260409024928.344010-1-marex@nabladev.com>
Patch Review
**Correctness: Good.**
The patch does two things:
1. Changes the `!conn_state->crtc` check from returning `-EINVAL` to returning `0`.
2. Moves the check *above* the `list_empty(&connector->modes)` check.
Both changes are correct:
- **Returning 0 instead of -EINVAL**: A NULL `crtc` in the new connector state simply means the connector is being disabled (or is already disabled). This is not an error. Other drivers in the tree follow the same pattern — e.g., `analogix_dp_core.c:906`, `vmwgfx_stdu.c:895`, `vkms_writeback.c:47` all do `if (!conn_state->crtc) return 0;`.
- **Moving the check earlier**: This is the right ordering. When the connector is disabled, there is no point validating modes or checking crtc state — none of that applies. Early-exit avoids a spurious "empty modes list" debug message or other irrelevant validation on a disabled connector.
Looking at the post-patch function (lines 896–923), the resulting flow is clean:
```c
conn_state = drm_atomic_get_new_connector_state(state, connector);
if (!conn_state)
return -EINVAL;
if (!conn_state->crtc) /* disabled connector — nothing to validate */
return 0;
if (list_empty(&connector->modes)) { /* only relevant when enabled */
...
}
```
The subsequent code at lines 912–921 dereferences `conn_state->crtc` (via `drm_atomic_get_crtc_state`), so the NULL check *must* precede it — which it did before and still does after the patch. No null-deref risk.
**Commit message**: Clear and well-written. The Fixes tag correctly references the original commit that introduced the driver. The explanation of the suspend/resume failure scenario is helpful.
**No issues found.**
---
Generated by Claude Code Patch Reviewer
prev parent reply other threads:[~2026-04-12 1:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 2:48 [PATCH] drm/bridge: stm_lvds: Do not fail atomic_check on disabled connector Marek Vasut
2026-04-12 1:47 ` Claude review: " Claude Code Review Bot
2026-04-12 1:47 ` 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-20260409024928.344010-1-marex@nabladev.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