lkml.org 
[lkml]   [2023]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH] media: camss: camss-video: Don't zero subdev format again after initialization
    From
    On 03/05/2023 08:53, Yassine Oudjana wrote:
    > From: Yassine Oudjana <y.oudjana@protonmail.com>
    >
    > In an earlier commit, setting the which field of the subdev format struct
    > in video_get_subdev_format was moved to a designated initializer that also
    > zeroes all other fields. However, the memset call that was zeroing the
    > fields earlier was left in place, causing the which field to be cleared
    > after being set in the initializer.
    >
    > Remove the memset call from video_get_subdev_format to avoid clearing the
    > initialized which field.
    >
    > Fixes: ecefa105cc44 ("media: Zero-initialize all structures passed to subdev pad operations")
    > Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
    > ---
    > drivers/media/platform/qcom/camss/camss-video.c | 1 -
    > 1 file changed, 1 deletion(-)
    >
    > diff --git a/drivers/media/platform/qcom/camss/camss-video.c b/drivers/media/platform/qcom/camss/camss-video.c
    > index 898f32177b12..8640db306026 100644
    > --- a/drivers/media/platform/qcom/camss/camss-video.c
    > +++ b/drivers/media/platform/qcom/camss/camss-video.c
    > @@ -353,7 +353,6 @@ static int video_get_subdev_format(struct camss_video *video,
    > if (subdev == NULL)
    > return -EPIPE;
    >
    > - memset(&fmt, 0, sizeof(fmt));
    > fmt.pad = pad;
    >
    > ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &fmt);

    Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

    \
     
     \ /
      Last update: 2023-05-03 11:40    [W:3.661 / U:0.096 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site