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/rockchip: dw_dp: Fix null-ptr-deref in dw_dp_remove() Date: Tue, 10 Mar 2026 11:47:01 +1000 Message-ID: In-Reply-To: <20260310-drm-rk-fixes-v2-3-645ecfb43f49@collabora.com> References: <20260310-drm-rk-fixes-v2-0-645ecfb43f49@collabora.com> <20260310-drm-rk-fixes-v2-3-645ecfb43f49@collabora.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: Good** The `dw_dp_remove()` callback previously did `platform_get_drvdata()` to ge= t `dp->dev`, but `platform_set_drvdata()` is only called inside `dw_dp_rock= chip_bind()` (the component bind). If bind was never called (e.g., `rockchi= p_drm_bind()` failed early), the drvdata is NULL and dereferencing it cause= s a null-ptr-deref. ```c - struct rockchip_dw_dp *dp =3D platform_get_drvdata(pdev); - component_del(dp->dev, &dw_dp_rockchip_component_ops); + component_del(&pdev->dev, &dw_dp_rockchip_component_ops); ``` Clean fix =E2=80=94 `&pdev->dev` is always valid. --- Generated by Claude Code Patch Reviewer