summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2023-01-26 14:03:51 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-10 09:39:46 +0100
commitd2512e1c9073f61083fbf478a37f555ea7013afc (patch)
tree79899ab260ff4cb7acf59430969ae5fd3dca2877 /drivers/media
parent29962c478e8b2e6a6154d8d84b8806dbe36f9c28 (diff)
downloadlinux-stable-d2512e1c9073f61083fbf478a37f555ea7013afc.tar.gz
linux-stable-d2512e1c9073f61083fbf478a37f555ea7013afc.tar.bz2
linux-stable-d2512e1c9073f61083fbf478a37f555ea7013afc.zip
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>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/i2c/ov7670.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c
index 1be2c0e5bdc1..23001ede138c 100644
--- a/drivers/media/i2c/ov7670.c
+++ b/drivers/media/i2c/ov7670.c
@@ -1841,7 +1841,7 @@ static int ov7670_parse_dt(struct device *dev,
if (bus_cfg.bus_type != V4L2_MBUS_PARALLEL) {
dev_err(dev, "Unsupported media bus type\n");
- return ret;
+ return -EINVAL;
}
info->mbus_config = bus_cfg.bus.parallel.flags;