media: i2c: imx274: fix error return code of imx274_s_frame_interval()
authorJia-Ju Bai <baijiaju1990@gmail.com>
Fri, 5 Mar 2021 03:19:42 +0000 (04:19 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 6 Apr 2021 12:31:59 +0000 (14:31 +0200)
commit9a4619ef6cc1182ba02d9d465903d47a12bdc55a
tree2af1359c1163b9d56ba3c9aa8c5bfbc1fe04d9bd
parenta7de6eac6f6f73d48d97a6c93032107775f4593b
media: i2c: imx274: fix error return code of imx274_s_frame_interval()

When __v4l2_ctrl_modify_range() fails, no error return code of
imx274_s_frame_interval() is assigned.
To fix this bug, ret is assigned with the return valye of
__v4l2_ctrl_modify_range(), and then ret is checked.

Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/imx274.c