diff options
author | Benoit Parrot <bparrot@ti.com> | 2019-09-30 15:06:40 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-10-01 22:35:00 +0200 |
commit | 85c4043f1d403c222d481dfc91846227d66663fb (patch) | |
tree | e8cfb468878829cea40ce1b207d6b878ea77d734 /drivers/media | |
parent | media: i2c: ov2659: Cleanup include file list (diff) | |
download | linux-85c4043f1d403c222d481dfc91846227d66663fb.tar.xz linux-85c4043f1d403c222d481dfc91846227d66663fb.zip |
media: i2c: ov2659: fix s_stream return value
In ov2659_s_stream() return value for invoked function should be checked
and propagated.
Signed-off-by: Benoit Parrot <bparrot@ti.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/i2c/ov2659.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/media/i2c/ov2659.c b/drivers/media/i2c/ov2659.c index f77320e8a60d..da181a13cf44 100644 --- a/drivers/media/i2c/ov2659.c +++ b/drivers/media/i2c/ov2659.c @@ -1187,11 +1187,15 @@ static int ov2659_s_stream(struct v4l2_subdev *sd, int on) goto unlock; } - ov2659_set_pixel_clock(ov2659); - ov2659_set_frame_size(ov2659); - ov2659_set_format(ov2659); - ov2659_set_streaming(ov2659, 1); - ov2659->streaming = on; + ret = ov2659_set_pixel_clock(ov2659); + if (!ret) + ret = ov2659_set_frame_size(ov2659); + if (!ret) + ret = ov2659_set_format(ov2659); + if (!ret) { + ov2659_set_streaming(ov2659, 1); + ov2659->streaming = on; + } unlock: mutex_unlock(&ov2659->lock); |