lkml.org 
[lkml]   [2019]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] media: imx: vdic: Restore default case to prepare_vdi_in_buffers()
    Date
    Restore a default case to prepare_vdi_in_buffers() to fix the following
    smatch errors:

    drivers/staging/media/imx/imx-media-vdic.c:236 prepare_vdi_in_buffers() error: uninitialized symbol 'prev_phys'.
    drivers/staging/media/imx/imx-media-vdic.c:237 prepare_vdi_in_buffers() error: uninitialized symbol 'curr_phys'.
    drivers/staging/media/imx/imx-media-vdic.c:238 prepare_vdi_in_buffers() error: uninitialized symbol 'next_phys'.

    Fixes: 6e537b58de772 ("media: imx: vdic: rely on VDIC for correct field order")

    Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
    Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
    ---
    drivers/staging/media/imx/imx-media-vdic.c | 6 ++++++
    1 file changed, 6 insertions(+)

    diff --git a/drivers/staging/media/imx/imx-media-vdic.c b/drivers/staging/media/imx/imx-media-vdic.c
    index 2808662e2597..37bfbd4a1c39 100644
    --- a/drivers/staging/media/imx/imx-media-vdic.c
    +++ b/drivers/staging/media/imx/imx-media-vdic.c
    @@ -231,6 +231,12 @@ static void __maybe_unused prepare_vdi_in_buffers(struct vdic_priv *priv,
    curr_phys = vb2_dma_contig_plane_dma_addr(curr_vb, 0);
    next_phys = vb2_dma_contig_plane_dma_addr(curr_vb, 0) + is;
    break;
    + default:
    + /*
    + * can't get here, priv->fieldtype can only be one of
    + * the above. This is to quiet smatch errors.
    + */
    + return;
    }

    ipu_cpmem_set_buffer(priv->vdi_in_ch_p, 0, prev_phys);
    --
    2.17.1
    \
     
     \ /
      Last update: 2019-02-20 02:10    [W:3.340 / U:11.324 seconds]
    ©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site