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/panel: jadard-jd9365da-h3: support variable DSI configuration Date: Sun, 12 Apr 2026 09:06:56 +1000 Message-ID: In-Reply-To: <20260411-waveshare-dsi-touch-v2-12-75cdbeac5156@oss.qualcomm.com> References: <20260411-waveshare-dsi-touch-v2-0-75cdbeac5156@oss.qualcomm.com> <20260411-waveshare-dsi-touch-v2-12-75cdbeac5156@oss.qualcomm.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Refactors to support 2-lane or 4-lane operation per DT configuration. **Bug -- signedness issue in probe**: ```c dsi->lanes = drm_of_get_data_lanes_count_remote(dsi->dev.of_node, 0, -1, 2, 4); if (dsi->lanes < 0) return dsi->lanes; ``` `dsi->lanes` is `unsigned int`. Assigning a negative error code to it and checking `< 0` will never trigger. A negative return (e.g., `-ENODEV`) will be stored as a large unsigned value and used as the lane count. Fix: use a temporary `int` variable, check it, then assign to `dsi->lanes`. **Potential NULL dereference**: `jadard_get_modes()` calls `drm_connector_helper_get_modes_fixed(connector, jadard->desc->mode_2ln)` when `lanes == 2`, but panels that only have `mode_4ln` set leave `mode_2ln` as NULL. This is safe in practice for existing panels since they hardcode `lanes = 4`, but is a latent risk. --- --- Generated by Claude Code Patch Reviewer