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/mediatek: dsi: Store driver data before invoking mipi_dsi_host_register Date: Tue, 24 Feb 2026 10:09:17 +1000 Message-ID: In-Reply-To: <20260223141638.2022490-1-l.scorcia@gmail.com> References: <20260223141638.2022490-1-l.scorcia@gmail.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: drm/mediatek: dsi: Store driver data before invoking mipi_dsi_host_register Author: Luca Leonardo Scorcia Patches: 1 Reviewed: 2026-02-24T10:09:17.084197 --- This is a single-patch fix for a NULL pointer dereference during mediatek-drm DSI probe. The bug is straightforward: commit e4732b590a77 rearranged the probe sequence so that `mipi_dsi_host_register()` is called before `platform_set_drvdata()`, but `mipi_dsi_host_register()` can synchronously trigger `mtk_dsi_host_attach()` -> `component_add()` -> `mtk_dsi_bind()`, which calls `dev_get_drvdata()` and dereferences the result. Since drvdata is still NULL at that point, the kernel crashes. The fix is minimal and correct: move `platform_set_drvdata(pdev, dsi)` before the `mipi_dsi_host_register()` call. The commit message is well-written, includes the full crash trace for reference, and has an appropriate Fixes tag. --- Generated by Claude Code Patch Reviewer