Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d39e46b authored by Philipp Zabel's avatar Philipp Zabel Committed by Mauro Carvalho Chehab
Browse files

media: tc358743: validate lane count



The TC358743 does not support more than 4 data lanes. Check that the
lane count is valid.

Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent cef66734
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1941,6 +1941,11 @@ static int tc358743_probe_of(struct tc358743_state *state)
		goto free_endpoint;
	}

	if (endpoint->bus.mipi_csi2.num_data_lanes > 4) {
		dev_err(dev, "invalid number of lanes\n");
		goto free_endpoint;
	}

	state->bus = endpoint->bus.mipi_csi2;

	ret = clk_prepare_enable(refclk);