[bug report] media: venus: Get codecs and capabilities from hfi platform

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Stanimir Varbanov,

The patch e29929266be1: "media: venus: Get codecs and capabilities
from hfi platform" from Aug 26, 2020, leads to the following static
checker warning:

drivers/media/platform/qcom/venus/hfi_parser.c:251 hfi_platform_parser() error: uninitialized symbol 'count'.
drivers/media/platform/qcom/venus/hfi_parser.c:254 hfi_platform_parser() error: uninitialized symbol 'enc_codecs'.
drivers/media/platform/qcom/venus/hfi_parser.c:255 hfi_platform_parser() error: uninitialized symbol 'dec_codecs'.

drivers/media/platform/qcom/venus/hfi_parser.c
   231  static int hfi_platform_parser(struct venus_core *core, struct venus_inst *inst)
   232  {
   233          const struct hfi_platform *plat;
   234          const struct hfi_plat_caps *caps = NULL;
   235          u32 enc_codecs, dec_codecs, count;
   236          unsigned int entries;
   237  
   238          if (inst)
   239                  return 0;
   240  
   241          plat = hfi_platform_get(core->res->hfi_version);
   242          if (!plat)
   243                  return -EINVAL;
   244  
   245          if (plat->codecs)
   246                  plat->codecs(&enc_codecs, &dec_codecs, &count);
   247  
   248          if (plat->capabilities)
   249                  caps = plat->capabilities(&entries);

These aren't initialized on the else path.

   250  
   251          if (!caps || !entries || !count)
   252                  return -EINVAL;
   253  
   254          core->enc_codecs = enc_codecs;
   255          core->dec_codecs = dec_codecs;
   256          core->codecs_count = count;
   257          core->max_sessions_supported = MAX_SESSIONS;
   258          memset(core->caps, 0, sizeof(*caps) * MAX_CODEC_NUM);
   259          memcpy(core->caps, caps, sizeof(*caps) * entries);
   260  
   261          return 0;
   262  }

regards,
dan carpenter



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux