Skip to content

Commit 2a72e3b

Browse files
Hans Verkuilgregkh
authored andcommitted
media: i2c: ov7670: 0 instead of -EINVAL was returned
[ Upstream commit 6a4c664 ] 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 <[email protected]> Fixes: 01b8444 ("media: v4l2: i2c: ov7670: Implement OF mbus configuration") Acked-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent d120334 commit 2a72e3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/media/i2c/ov7670.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1824,7 +1824,7 @@ static int ov7670_parse_dt(struct device *dev,
18241824

18251825
if (bus_cfg.bus_type != V4L2_MBUS_PARALLEL) {
18261826
dev_err(dev, "Unsupported media bus type\n");
1827-
return ret;
1827+
return -EINVAL;
18281828
}
18291829
info->mbus_config = bus_cfg.bus.parallel.flags;
18301830

0 commit comments

Comments
 (0)