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: anx7625: don't crash if Type-C port is not used Date: Sun, 15 Feb 2026 19:02:41 +1000 Message-ID: In-Reply-To: <20260215-anx-fix-no-typec-v1-1-75172a5ca88b@oss.qualcomm.com> References: <20260215-anx-fix-no-typec-v1-1-75172a5ca88b@oss.qualcomm.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Overall Series Review Subject: drm: bridge: anx7625: don't crash if Type-C port is not used Author: Dmitry Baryshkov Patches: 1 Reviewed: 2026-02-15T19:02:41.103070 --- This is a single-patch fix for a NULL pointer dereference crash in the anx762= 5 DRM bridge driver's Type-C support code. The crash occurs when CONFIG_TYPEC= is enabled but the anx7625 device tree node does not include a USB-C connect= or fwnode, leaving `ctx->typec_port` as NULL. The `typec_set_*()` family of f= unctions do not handle NULL port arguments, so calling them unconditionally c= auses a kernel crash. The fix is minimal and appropriate: a NULL check on `ctx->typec_port` at the = top of `anx7625_typec_set_status()`, which is the single chokepoint through w= hich all typec state updates flow. The commit message includes the actual cra= sh trace, a clear Fixes: tag, and proper attribution. The approach is correct= =E2=80=94 guarding at the entry point rather than at each individual `typec_= set_*()` call site keeps the fix simple and complete. One minor observation: the original submitter's changelog mentioned a dropped= chunk for `anx7625_typec_unregister()`. Since `typec_unregister_port()` also= does not tolerate NULL, that path could have a similar issue if the unregist= er path is reached without a typec port having been registered. However, the = note "[db: dropped chunk anx7625_typec_unregister()]" suggests this was consi= dered and determined unnecessary =E2=80=94 likely because `typec_unregister_p= ort(NULL)` is either already guarded or the unregister path isn't reachable w= ithout a successful registration. Without the tree containing this code I can= not verify, but it's worth the author confirming. --- Generated by Claude Code Patch Reviewer