diff options
author | Jia-Ju Bai <baijiaju1990@gmail.com> | 2021-03-05 04:19:42 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-04-06 14:31:59 +0200 |
commit | 9a4619ef6cc1182ba02d9d465903d47a12bdc55a (patch) | |
tree | 2af1359c1163b9d56ba3c9aa8c5bfbc1fe04d9bd | |
parent | a7de6eac6f6f73d48d97a6c93032107775f4593b (diff) |
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>
-rw-r--r-- | drivers/media/i2c/imx274.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/i2c/imx274.c b/drivers/media/i2c/imx274.c index a9305077be45..cdccaab3043a 100644 --- a/drivers/media/i2c/imx274.c +++ b/drivers/media/i2c/imx274.c @@ -1381,7 +1381,8 @@ static int imx274_s_frame_interval(struct v4l2_subdev *sd, max = fi->interval.numerator * 1000000 / fi->interval.denominator; def = max; - if (__v4l2_ctrl_modify_range(ctrl, min, max, 1, def)) { + ret = __v4l2_ctrl_modify_range(ctrl, min, max, 1, def); + if (ret) { dev_err(&imx274->client->dev, "Exposure ctrl range update failed\n"); goto unlock; |