[bug report] media: atomisp: remove some trivial wrappers from compat css20

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

 



Hello Atomisp devs,

This is a semi-automatic email about new static checker warnings.

The patch 1a16d5453978: "media: atomisp: remove some trivial wrappers 
from compat css20" from May 28, 2020, leads to the following Smatch 
complaint:

    drivers/staging/media/atomisp/pci/sh_css_firmware.c:247 sh_css_load_firmware()
    warn: variable dereferenced before check 'fw_data' (see line 237)

drivers/staging/media/atomisp/pci/sh_css_firmware.c
   236			min(sizeof(FW_rel_ver_name), sizeof(file_header->version)));
   237		ret = sh_css_check_firmware_version(dev, fw_data);
                                                         ^^^^^^^
Dereferenced.

   238		if (ret) {
   239			IA_CSS_ERROR("CSS code version (%s) and firmware version (%s) mismatch!",
   240				     file_header->version, release_version);
   241			return -EINVAL;
   242		} else {
   243			IA_CSS_LOG("successfully load firmware version %s", release_version);
   244		}
   245	
   246		/* some sanity checks */
   247		if (!fw_data || fw_size < sizeof(struct sh_css_fw_bi_file_h))
                     ^^^^^^^
Too late.

   248			return -EINVAL;
   249	

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