tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
staging-testing
head:   14442181d20490945f341644bb8257e334b01447
commit: b18ee53ad297264a79cf4ea566663f20786b6455 [32/135] staging: bcm2835: 
Break MMAL support out from camera
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <l...@intel.com>


cppcheck warnings: (new ones prefixed by >>)

>> drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1722:6: warning: 
>> Variable 'ret' is reassigned a value before the old one has been used. 
>> [redundantAssignment]
    ret = destroy_component(instance, component);
        ^
   drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1720:7: note: Variable 
'ret' is reassigned a value before the old one has been used.
     ret = disable_component(instance, component);
         ^
   drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1722:6: note: Variable 
'ret' is reassigned a value before the old one has been used.
    ret = destroy_component(instance, component);
        ^

vim +/ret +1722 drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c

7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1707  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1708  /*
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1709   * cause a mmal component to be destroyed
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1710   */
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1711  int vchiq_mmal_component_finalise(struct 
vchiq_mmal_instance *instance,
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1712                                struct 
vchiq_mmal_component *component)
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1713  {
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1714      int ret;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1715  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1716      if 
(mutex_lock_interruptible(&instance->vchiq_mutex))
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1717              return -EINTR;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1718  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1719      if (component->enabled)
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1720              ret = disable_component(instance, 
component);
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1721  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27 @1722      ret = destroy_component(instance, component);
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1723  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1724      mutex_unlock(&instance->vchiq_mutex);
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1725  
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1726      return ret;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1727  }
b18ee53ad29726 drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c Jacopo 
Mondi 2020-06-23  1728  EXPORT_SYMBOL_GPL(vchiq_mmal_component_finalise);
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c   Eric 
Anholt  2017-01-27  1729  

:::::: The code at line 1722 was first introduced by commit
:::::: 7b3ad5abf027b7643b38c4006d7f4ce47a86dd3a staging: Import the BCM2835 
MMAL-based V4L2 camera driver.

:::::: TO: Eric Anholt <e...@anholt.net>
:::::: CC: Greg Kroah-Hartman <gre...@linuxfoundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to