]> git.baikalelectronics.ru Git - kernel.git/commit
media: i2c: ov7670: 0 instead of -EINVAL was returned
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 26 Jan 2023 13:03:51 +0000 (14:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 15:43:53 +0000 (16:43 +0100)
commitbccb599312b82cbf91ed8da12d4d61be9c8d53dc
treeb62c1ca8b2c8432c91ab3397d94b61491dda3695
parentae57528ee04a5d095fbd9b61982d32aa821b2b5a
media: i2c: ov7670: 0 instead of -EINVAL was returned

[ Upstream commit 6a4c664539e6de9b32b65ddcf767ec1bcc1d7f8a ]

If the media bus is unsupported, then return -EINVAL. Instead it
returned 'ret' which happened to be 0.

This fixes a smatch warning:

ov7670.c:1843 ov7670_parse_dt() warn: missing error code? 'ret'

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: 0c1ec6d31c62 ("media: v4l2: i2c: ov7670: Implement OF mbus configuration")
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/i2c/ov7670.c