[media] media: davinci_vpfe: clear the output_specs
authorLad, Prabhakar <prabhakar.csengg@gmail.com>
Mon, 25 May 2015 15:34:27 +0000 (12:34 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 5 Jun 2015 09:34:48 +0000 (06:34 -0300)
clear of the output_specs before passing it to the
configure_resizer_out_params(), so that no garbage values
are set.

This fixes following build warning:
drivers/staging/media/davinci_vpfe/dm365_resizer.c: In function 'resizer_set_stream':
drivers/staging/media/davinci_vpfe/dm365_resizer.c:190:46: warning: 'output_specs.vst_c'
may be used uninitialized in this function [-Wmaybe-uninitialized]
  param->ext_mem_param[index].rsz_sdr_ptr_s_c = output->vst_c;
                                              ^
drivers/staging/media/davinci_vpfe/dm365_resizer.c:316:30: note: 'output_specs.vst_c' was declared here
  struct vpfe_rsz_output_spec output_specs;
                              ^

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/staging/media/davinci_vpfe/dm365_resizer.c

index b6498137de56b5ad5dd4477197880df6961490ff..acb293ed9c91c74ae1ebadd56a7f5a059dacabe6 100644 (file)
@@ -321,6 +321,7 @@ static int resizer_configure_output_win(struct vpfe_resizer_device *resizer)
 
        outformat = &resizer->resizer_a.formats[RESIZER_PAD_SOURCE];
 
+       memset(&output_specs, 0x0, sizeof(struct vpfe_rsz_output_spec));
        output_specs.vst_y = param->user_config.vst;
        if (outformat->code == MEDIA_BUS_FMT_YDYUYDYV8_1X16)
                output_specs.vst_c = param->user_config.vst;