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: analogix_dp: Apply panel_bridge helper Date: Sun, 12 Apr 2026 11:37:42 +1000 Message-ID: In-Reply-To: <20260409071908.466294-5-damon.ding@rock-chips.com> References: <20260409065301.446670-1-damon.ding@rock-chips.com> <20260409071908.466294-5-damon.ding@rock-chips.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Bug found**: In `analogix_dp_bind()`: ```c if (dp->plat_data->panel) { dp->plat_data->next_bridge = devm_drm_panel_bridge_add(dp->dev, dp->plat_data->panel); if (IS_ERR(dp->plat_data->next_bridge)) { ret = PTR_ERR(bridge); // BUG: should be PTR_ERR(dp->plat_data->next_bridge) goto err_unregister_aux; } } ``` `bridge` here is the local variable `&dp->bridge`, which is a valid (non-error) pointer. This means `PTR_ERR(bridge)` will return a garbage non-error value (or 0), and the caller won't see the failure. This should be: ```c ret = PTR_ERR(dp->plat_data->next_bridge); ``` Otherwise, the patch correctly: - Wraps the panel with `devm_drm_panel_bridge_add()` to create a bridge - Removes all explicit `drm_panel_prepare/enable/disable/unprepare` calls - Removes `analogix_dp_bridge_get_modes()` (panel modes now come through the panel_bridge) - Simplifies bridge ops to always be `DRM_BRIDGE_OP_EDID | DRM_BRIDGE_OP_DETECT` (modes come from the panel_bridge's own ops) - Updates `analogix_dp_bridge_detect()` to check `next_bridge` instead of `panel` The minor typos in the commit message ("ben" -> "been", "plane_bridge" -> "panel_bridge", "automic" -> "atomic") should be fixed. --- Generated by Claude Code Patch Reviewer