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: Extract error pointer from correct variable Date: Tue, 05 May 2026 11:59:49 +1000 Message-ID: In-Reply-To: <20260429030840.704252-1-ethantidmore06@gmail.com> References: <20260429030840.704252-1-ethantidmore06@gmail.com> <20260429030840.704252-1-ethantidmore06@gmail.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Bug Analysis**: Correct and real bug. The code does: ```c dp->plat_data->next_bridge =3D devm_drm_panel_bridge_add(dp->dev, dp->plat_data->panel= ); if (IS_ERR(dp->plat_data->next_bridge)) { ret =3D PTR_ERR(bridge); // BUG: wrong variable goto err_unregister_aux; } ``` `bridge` is a separate local variable (the `struct drm_bridge *` for `dp->b= ridge`) that is a valid pointer at this point. Calling `PTR_ERR()` on a val= id pointer returns garbage =E2=80=94 typically a large positive number that= gets truncated to an `int`, resulting in a misleading or zero return code.= The caller would not see a proper `-ENODEV`/`-ENOMEM`/etc. **Fix**: Correct. Changes `PTR_ERR(bridge)` to `PTR_ERR(dp->plat_data->next= _bridge)`, matching the variable tested by `IS_ERR()`. ```c ret =3D PTR_ERR(dp->plat_data->next_bridge); // FIXED: matches IS_ERR check ``` **Commit message**: Clear and well-structured. Includes the Smatch warning,= a proper `Fixes:` tag referencing the commit that introduced the bug (`1b8= 6a69b61df4`), and a signed-off-by. **Minor notes**: - The `Fixes:` tag hash `1b86a69b61df4` uses 13 hex chars =E2=80=94 the sta= ndard convention is 12 chars. This is cosmetic and most tooling handles it = fine, but `1b86a69b61df` would be more conventional. - As noted above, this code has been removed in drm-next. The maintainers s= hould consider whether this patch should target stable branches instead. **Rating**: The fix is correct, minimal, and addresses a genuine bug. Recom= mended for merge (targeting the appropriate branch where this code still ex= ists). --- Generated by Claude Code Patch Reviewer