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>
Fri, 10 Mar 2023 08:33:44 +0000 (09:33 +0100)
commit69a9a301a5d80f4d5f4a5616916f6437ec89735e
treefb793651a52edd5a6d679829c843fd1077c6bb86
parent5259b92dc466196b622fa227eeed16a19df8d27f
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: 01b8444828fc ("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