media: i2c: ov7670: 0 instead of -EINVAL was returned
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: 01b8444828
("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>
This commit is contained in:
parent
0d3732fb1b
commit
6a4c664539
1 changed files with 1 additions and 1 deletions
|
@ -1840,7 +1840,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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue