lkml.org 
[lkml]   [2019]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 030/161] media: i2c: ov2659: fix s_stream return value
    Date
    From: Benoit Parrot <bparrot@ti.com>

    [ Upstream commit 85c4043f1d403c222d481dfc91846227d66663fb ]

    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>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/media/i2c/ov2659.c | 14 +++++++++-----
    1 file changed, 9 insertions(+), 5 deletions(-)

    diff --git a/drivers/media/i2c/ov2659.c b/drivers/media/i2c/ov2659.c
    index ce23f436e130..04d493aea45e 100644
    --- a/drivers/media/i2c/ov2659.c
    +++ b/drivers/media/i2c/ov2659.c
    @@ -1203,11 +1203,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);
    --
    2.20.1


    \
     
     \ /
      Last update: 2019-12-29 18:59    [W:2.834 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site