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/i915/display/intel_lvds: Drop redundant manual cleanup on init failure Date: Sun, 12 Apr 2026 10:51:24 +1000 Message-ID: In-Reply-To: <20260409-feat_link_cap-v1-2-7069e8199ce2@bootlin.com> References: <20260409-feat_link_cap-v1-0-7069e8199ce2@bootlin.com> <20260409-feat_link_cap-v1-2-7069e8199ce2@bootlin.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Correct. After `drm_connector_init_with_ddc()` and `drm_encoder_init()` succeed, both objects are registered with the DRM core. The `.destroy` callbacks (`intel_connector_destroy` for the connector, `intel_encoder_destroy` for the encoder) will be invoked by `drm_mode_config_cleanup()` during device teardown. I verified that `intel_encoder_destroy()` does: ```c struct intel_encoder *intel_encoder = to_intel_encoder(encoder); drm_encoder_cleanup(encoder); kfree(intel_encoder); ``` Since `struct intel_lvds_encoder` has `struct intel_encoder base` as its first field, the `kfree` correctly frees the containing `intel_lvds_encoder` allocation. No leak. The replacement path (`return` early with a `drm_dbg_kms`) is clean. The downside is that a non-functional LVDS encoder/connector pair remains registered until device teardown, but this is consistent with how other init failures are handled. --- Generated by Claude Code Patch Reviewer