On Thu Aug 6 14:18:19 2026 +0800, Serin Yeh wrote:
> The driver currently prints the number of data lanes using
> ov8856->cur_mode->data_lanes in ov8856_get_hwcfg(). However,
> the ov8856->cur_mode structure is not assigned to a clearly
> supported mode at that point. Due to the missing pointer,
> enabling dynamic debug may lead to a kernel panic.
> 
> Instead, the correct number of CSI-2 data lanes should be taken
> from bus_cfg.bus.mipi_csi2.num_data_lanes, which represents the
> real hardware configuration determined at runtime.
> 
> Fixes: c492ec9ae9ed ("media: ov8856: Add support for 2 data lanes")
> Cc: [email protected]
> Signed-off-by: Serin Yeh <[email protected]>
> Reviewed-by: Kieran Bingham <[email protected]>
> Signed-off-by: Sakari Ailus <[email protected]>

Patch committed.

Thanks,
Sakari Ailus

 drivers/media/i2c/ov8856.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

---

diff --git a/drivers/media/i2c/ov8856.c b/drivers/media/i2c/ov8856.c
index 9d2b0469a576..6011233a218d 100644
--- a/drivers/media/i2c/ov8856.c
+++ b/drivers/media/i2c/ov8856.c
@@ -2318,7 +2318,8 @@ static int ov8856_get_hwcfg(struct ov8856 *ov8856)
                goto check_hwcfg_error;
        }
 
-       dev_dbg(dev, "Using %u data lanes\n", ov8856->cur_mode->data_lanes);
+       dev_dbg(dev, "Using %u data lanes\n",
+               bus_cfg.bus.mipi_csi2.num_data_lanes);
 
        if (bus_cfg.bus.mipi_csi2.num_data_lanes == 2)
                ov8856->priv_lane = &lane_cfg_2;
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to