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: th1520-dw-hdmi: Fix error check on dw_hdmi_probe() return value Date: Sun, 22 Mar 2026 03:24:58 +1000 Message-ID: In-Reply-To: <20260321-th1520-v1-1-ec877197770d@gmail.com> References: <20260321-th1520-v1-0-ec877197770d@gmail.com> <20260321-th1520-v1-1-ec877197770d@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 **Verdict: Correct, good fix.** The original code was: ```c hdmi->dw_hdmi =3D dw_hdmi_probe(pdev, plat_data); if (IS_ERR(hdmi)) return PTR_ERR(hdmi); ``` This is wrong because `hdmi` is the `struct th1520_hdmi *` allocated earlie= r via `devm_kzalloc()` =E2=80=94 it's always a valid kernel pointer, never = an ERR_PTR. The error encoding from `dw_hdmi_probe()` is stored in `hdmi->d= w_hdmi`, so `IS_ERR(hdmi)` would always be false, causing the driver to sil= ently proceed with an error pointer stored in `hdmi->dw_hdmi`, leading to c= rashes later. The fix correctly checks `hdmi->dw_hdmi`: ```c if (IS_ERR(hdmi->dw_hdmi)) return PTR_ERR(hdmi->dw_hdmi); ``` No issues. Fixes tag and commit message are accurate. --- Generated by Claude Code Patch Reviewer