From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/i915/display/intel_dp: Drop redundant intel_dp_aux_fini() on init failure
Date: Thu, 04 Jun 2026 11:52:28 +1000 [thread overview]
Message-ID: <review-patch3-20260603-fix_i915-v1-3-7479ff64e705@bootlin.com> (raw)
In-Reply-To: <20260603-fix_i915-v1-3-7479ff64e705@bootlin.com>
Patch Review
**Verdict: Correct.**
The analysis is clear:
1. When `intel_edp_init_connector()` fails, the code calls `intel_dp_aux_fini(intel_dp)` then jumps to `fail:`.
2. The `fail:` label at line 7467 calls `drm_connector_cleanup()`. The connector was initialized with `intel_dp_connector_funcs` which has `.destroy` — but `drm_connector_cleanup()` does NOT call `.destroy`, it just removes from the list and cleans up state.
3. However, the *encoder* will still have its `.destroy` callback called during device teardown — either `intel_dp_encoder_destroy` or `intel_ddi_encoder_destroy`, both of which call `intel_dp_encoder_flush_work()`, which calls `intel_dp_aux_fini()` at line 6811.
4. So `intel_dp_aux_fini()` would be called twice: once explicitly in the error path, and once via the encoder destroy callback.
The fix correctly removes the explicit call, keeping only the one in the encoder destroy path. The `intel_dp_aux_fini()` function unregisters the aux I2C adapter, and calling it twice would indeed be problematic (double unregister/double kfree of adapter name).
One minor note: the patch also changes the code style from a `{ }` block to a bare `if` statement with the `goto`, which is fine since the single statement no longer needs braces.
**Clean and correct fix.**
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-06-04 1:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 8:59 [PATCH 0/3] drm/i915: Fix double cleanup in error paths Kory Maincent
2026-06-03 8:59 ` [PATCH 1/3] drm/i915/display/intel_sdvo: Fix double connector destroy " Kory Maincent
2026-06-04 1:52 ` Claude review: " Claude Code Review Bot
2026-06-03 8:59 ` [PATCH 2/3] drm/i915/display/intel_lvds: Drop redundant manual cleanup on init failure Kory Maincent
2026-06-04 1:52 ` Claude review: " Claude Code Review Bot
2026-06-03 8:59 ` [PATCH 3/3] drm/i915/display/intel_dp: Drop redundant intel_dp_aux_fini() " Kory Maincent
2026-06-03 11:58 ` Imre Deak
2026-06-04 1:52 ` Claude Code Review Bot [this message]
2026-06-03 16:35 ` [PATCH 0/3] drm/i915: Fix double cleanup in error paths Kory Maincent
2026-06-04 1:52 ` Claude review: " Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-04-09 17:08 [PATCH RFC 00/12] Add support for DisplayPort link training information report Kory Maincent
2026-04-09 17:08 ` [PATCH RFC 03/12] drm/i915/display/intel_dp: Drop redundant intel_dp_aux_fini() on init failure Kory Maincent
2026-04-12 0:51 ` 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-patch3-20260603-fix_i915-v1-3-7479ff64e705@bootlin.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