From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm: bridge: anx7625: don't crash if Type-C port is not used
Date: Sun, 15 Feb 2026 19:02:41 +1000 [thread overview]
Message-ID: <review-patch1-20260215-anx-fix-no-typec-v1-1-75172a5ca88b@oss.qualcomm.com> (raw)
In-Reply-To: <20260215-anx-fix-no-typec-v1-1-75172a5ca88b@oss.qualcomm.com>
Patch Review
> + if (!ctx->typec_port)
> + return;
> +
> if (intr_vector & CC_STATUS)
> anx7625_typec_set_orientation(ctx);
> if (intr_vector & DATA_ROLE_STATUS) {
The fix is correct and well-placed. `anx7625_typec_set_status()` is the function that dispatches to `anx7625_typec_set_orientation()` and the data/power role status paths, all of which ultimately call `typec_set_*()` functions that will dereference the port pointer. Guarding at this single entry point covers all downstream call sites.
One question: the changelog notes that a chunk fixing `anx7625_typec_unregister()` was dropped. Does `anx7625_typec_unregister()` also need a NULL guard on `ctx->typec_port` before calling `typec_unregister_port()`? If the driver's remove/unbind path can be reached without the typec port having been successfully registered (e.g., probe succeeded but typec registration was skipped because the connector fwnode was absent), then the same NULL dereference would occur on driver removal. It would be worth confirming that the unregister path is already safe.
Otherwise, no issues found. The fix is minimal, targeted, has the correct Fixes: tag, and the commit message clearly explains the problem with an actual crash trace.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-02-15 9:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-15 1:30 [PATCH] drm: bridge: anx7625: don't crash if Type-C port is not used Dmitry Baryshkov
2026-02-15 9:02 ` Claude Code Review Bot [this message]
2026-02-15 9:02 ` 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-20260215-anx-fix-no-typec-v1-1-75172a5ca88b@oss.qualcomm.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