summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorDafna Hirschfeld <dafna.hirschfeld@collabora.com>2020-03-31 20:06:30 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-05-18 11:11:44 +0200
commitb2bbf1aac61186ef904fd28079e847d3feadb89e (patch)
treedd89f2a4c4240d2f3eef4e471923d726ab6c3499 /drivers/media
parente6d4ef7d58aa7e64aa735e1b3c7b670e4fb34d6f (diff)
media: i2c: imx219: Fix a bug in imx219_enum_frame_size
When enumerating the frame sizes, the value sent to imx219_get_format_code should be fse->code (the code from the ioctl) and not imx219->fmt.code which is the code set currently in the driver. Fixes: 22da1d56e982 ("media: i2c: imx219: Add support for RAW8 bit bayer format") Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Reviewed-by: Helen Koike <helen.koike@collabora.com> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/i2c/imx219.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
index 8ff2a610cdc7..e63288ddd721 100644
--- a/drivers/media/i2c/imx219.c
+++ b/drivers/media/i2c/imx219.c
@@ -824,7 +824,7 @@ static int imx219_enum_frame_size(struct v4l2_subdev *sd,
if (fse->index >= ARRAY_SIZE(supported_modes))
return -EINVAL;
- if (fse->code != imx219_get_format_code(imx219, imx219->fmt.code))
+ if (fse->code != imx219_get_format_code(imx219, fse->code))
return -EINVAL;
fse->min_width = supported_modes[fse->index].width;