From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260409024928.344010-1-marex@nabladev.com> References: <20260409024928.344010-1-marex@nabladev.com> <20260409024928.344010-1-marex@nabladev.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Correctness: Good.** The patch does two things: 1. Changes the `!conn_state->crtc` check from returning `-EINVAL` to return= ing `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 st= ate 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 =E2= =80=94 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 connec= tor is disabled, there is no point validating modes or checking crtc state = =E2=80=94 none of that applies. Early-exit avoids a spurious "empty modes l= ist" debug message or other irrelevant validation on a disabled connector. Looking at the post-patch function (lines 896=E2=80=93923), the resulting f= low is clean: ```c conn_state =3D drm_atomic_get_new_connector_state(state, connector); if (!conn_state) return -EINVAL; if (!conn_state->crtc) /* disabled connector =E2=80=94 nothing to va= lidate */ return 0; if (list_empty(&connector->modes)) { /* only relevant when enabled */ ... } ``` The subsequent code at lines 912=E2=80=93921 dereferences `conn_state->crtc= ` (via `drm_atomic_get_crtc_state`), so the NULL check *must* precede it = =E2=80=94 which it did before and still does after the patch. No null-deref= risk. **Commit message**: Clear and well-written. The Fixes tag correctly referen= ces 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