]> git.baikalelectronics.ru Git - kernel.git/commit
media: tc358743: Fix error return code in tc358743_probe_of()
authorZhen Lei <thunder.leizhen@huawei.com>
Sat, 15 May 2021 06:58:30 +0000 (08:58 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 2 Jun 2021 11:31:39 +0000 (13:31 +0200)
commit3c294d81738d89b14dcabf8442efab98879aaf15
tree3240ad263f99f87aaa5d1fbdfb9ea10db98b1685
parentcefba1fe4519f357a02ac848c235dbfa62f2c26f
media: tc358743: Fix error return code in tc358743_probe_of()

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: 2cfda1a4005e ("[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>
drivers/media/i2c/tc358743.c