Skip to content

Commit a77934f

Browse files
Zhen Leigregkh
authored andcommitted
media: tc358743: Fix error return code in tc358743_probe_of()
[ Upstream commit a6b1e70 ] When the CSI bps per lane is not in the valid range, an appropriate error code -EINVAL should be returned. However, we currently do not explicitly assign this error code to 'ret'. As a result, 0 was incorrectly returned. Fixes: 2561482 ("[media] tc358743: support probe from device tree") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 2d2fee1 commit a77934f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/media/i2c/tc358743.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,6 +1974,7 @@ static int tc358743_probe_of(struct tc358743_state *state)
19741974
bps_pr_lane = 2 * endpoint.link_frequencies[0];
19751975
if (bps_pr_lane < 62500000U || bps_pr_lane > 1000000000U) {
19761976
dev_err(dev, "unsupported bps per lane: %u bps\n", bps_pr_lane);
1977+
ret = -EINVAL;
19771978
goto disable_clk;
19781979
}
19791980

0 commit comments

Comments
 (0)