* [PATCH 1/1] media: tc358743: Fix error return code in tc358743_probe_of()
@ 2021-05-15 6:58 Zhen Lei
0 siblings, 0 replies; only message in thread
From: Zhen Lei @ 2021-05-15 6:58 UTC (permalink / raw
To: Mats Randgaard, Mauro Carvalho Chehab, Hans Verkuil,
Philipp Zabel, linux-media
Cc: Zhen Lei
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: 256148246852 ("[media] tc358743: support probe from device tree")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
drivers/media/i2c/tc358743.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c
index 1b309bb743c7bd7..f21da11caf22411 100644
--- a/drivers/media/i2c/tc358743.c
+++ b/drivers/media/i2c/tc358743.c
@@ -1974,6 +1974,7 @@ static int tc358743_probe_of(struct tc358743_state *state)
bps_pr_lane = 2 * endpoint.link_frequencies[0];
if (bps_pr_lane < 62500000U || bps_pr_lane > 1000000000U) {
dev_err(dev, "unsupported bps per lane: %u bps\n", bps_pr_lane);
+ ret = -EINVAL;
goto disable_clk;
}
--
2.26.0.106.g9fadedd
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-15 6:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-15 6:58 [PATCH 1/1] media: tc358743: Fix error return code in tc358743_probe_of() Zhen Lei
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).