Claude review: drm/panel: jadard-jd9365da-h3: support variable DSI configuration

Claude Code Review Bot
2026-04-11T23:06:56Z

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