lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 20 Aug 2020 02:56:15 +0800
From:   kernel test robot <lkp@...el.com>
To:     Mauro Carvalho Chehab <mchehab@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        linux-media@...r.kernel.org
Subject: drivers/media/i2c/adv748x/adv748x-core.c:132:10: warning: Identical
 inner 'return' condition is always true.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   18445bf405cb331117bc98427b1ba6f12418ad17
commit: 32a363d0b0b142f35512848dc646ee53e0926723 media: Kconfig files: use select for V4L2 subdevs and MC
date:   4 months ago
compiler: h8300-linux-gcc (GCC) 9.3.0

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


cppcheck warnings: (new ones prefixed by >>)

>> drivers/media/i2c/adv748x/adv748x-core.c:132:10: warning: Identical inner 'return' condition is always true. [identicalInnerCondition]
     return *error;
            ^
   drivers/media/i2c/adv748x/adv748x-core.c:131:6: note: outer condition: *error
    if (*error)
        ^
   drivers/media/i2c/adv748x/adv748x-core.c:132:10: note: identical inner condition: *error
     return *error;
            ^
>> drivers/media/i2c/tda1997x.c:2108:6: warning: Variable 'reg' is reassigned a value before the old one has been used. [redundantAssignment]
    reg = io_read(sd, REG_CMTP_REG10);
        ^
   drivers/media/i2c/tda1997x.c:2106:6: note: Variable 'reg' is reassigned a value before the old one has been used.
    reg = io_read(sd, REG_VERSION);
        ^
   drivers/media/i2c/tda1997x.c:2108:6: note: Variable 'reg' is reassigned a value before the old one has been used.
    reg = io_read(sd, REG_CMTP_REG10);
        ^
   drivers/media/i2c/tda1997x.c:2176:6: warning: Variable 'reg' is reassigned a value before the old one has been used. [redundantAssignment]
    reg = HDMI_CTRL_MUTE_AUTO << HDMI_CTRL_MUTE_SHIFT;
        ^
   drivers/media/i2c/tda1997x.c:2108:6: note: Variable 'reg' is reassigned a value before the old one has been used.
    reg = io_read(sd, REG_CMTP_REG10);
        ^
   drivers/media/i2c/tda1997x.c:2176:6: note: Variable 'reg' is reassigned a value before the old one has been used.
    reg = HDMI_CTRL_MUTE_AUTO << HDMI_CTRL_MUTE_SHIFT;
        ^
>> drivers/media/i2c/tda1997x.c:2539:34: warning: Local variable pdata shadows outer variable [shadowVar]
     struct tda1997x_platform_data *pdata =
                                    ^
   drivers/media/i2c/tda1997x.c:2508:33: note: Shadowed declaration
    struct tda1997x_platform_data *pdata;
                                   ^
   drivers/media/i2c/tda1997x.c:2539:34: note: Shadow variable
     struct tda1997x_platform_data *pdata =
                                    ^

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=32a363d0b0b142f35512848dc646ee53e0926723
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 32a363d0b0b142f35512848dc646ee53e0926723
vim +/return +132 drivers/media/i2c/adv748x/adv748x-core.c

3e89586a64dfd2 Kieran Bingham   2017-07-06  127  
0ad5b80cff5093 Niklas Söderlund 2018-11-28  128  static int adv748x_write_check(struct adv748x_state *state, u8 page, u8 reg,
0ad5b80cff5093 Niklas Söderlund 2018-11-28  129  			       u8 value, int *error)
0ad5b80cff5093 Niklas Söderlund 2018-11-28  130  {
0ad5b80cff5093 Niklas Söderlund 2018-11-28  131  	if (*error)
0ad5b80cff5093 Niklas Söderlund 2018-11-28 @132  		return *error;
0ad5b80cff5093 Niklas Söderlund 2018-11-28  133  
0ad5b80cff5093 Niklas Söderlund 2018-11-28  134  	*error = adv748x_write(state, page, reg, value);
0ad5b80cff5093 Niklas Söderlund 2018-11-28  135  	return *error;
0ad5b80cff5093 Niklas Söderlund 2018-11-28  136  }
0ad5b80cff5093 Niklas Söderlund 2018-11-28  137  

:::::: The code at line 132 was first introduced by commit
:::::: 0ad5b80cff509360ef9953ac7ce5a56964210c30 media: i2c: adv748x: configure number of lanes used for TXA CSI-2 transmitter

:::::: TO: Niklas Söderlund <niklas.soderlund+renesas@...natech.se>
:::::: CC: Mauro Carvalho Chehab <mchehab+samsung@...nel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ