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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20201027175252.GN18329@kadam>
Date:   Tue, 27 Oct 2020 20:52:52 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     kbuild@...ts.01.org, Daniel Vetter <daniel.vetter@...ll.ch>
Cc:     lkp@...el.com, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [kbuild] drivers/gpu/drm/aspeed/aspeed_gfx_drv.c:80:9: warning:
 Identical condition 'ret', second condition is always false

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git  master
head:   4525c8781ec0701ce824e8bd379ae1b129e26568
commit: c2c25c1cf96927a0b6ddb6aaa063f1fdcc90d749 drm/aspeed: Use managed drmm_mode_config_cleanup
compiler: nds32le-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 possible warnings: (new ones prefixed by >>, may not real problems)

>> drivers/gpu/drm/aspeed/aspeed_gfx_drv.c:80:9: warning: Identical condition 'ret', second condition is always false [identicalConditionAfterEarlyExit]
    return ret;
           ^
   drivers/gpu/drm/aspeed/aspeed_gfx_drv.c:71:6: note: first condition
    if (ret)
        ^
   drivers/gpu/drm/aspeed/aspeed_gfx_drv.c:80:9: note: second condition
    return ret;
           ^

vim +/ret +80 drivers/gpu/drm/aspeed/aspeed_gfx_drv.c

c2c25c1cf96927a Daniel Vetter 2020-09-04  66  static int aspeed_gfx_setup_mode_config(struct drm_device *drm)
4f2a8f5898ecd80 Joel Stanley  2019-04-03  67  {
c2c25c1cf96927a Daniel Vetter 2020-09-04  68  	int ret;
c2c25c1cf96927a Daniel Vetter 2020-09-04  69  
c2c25c1cf96927a Daniel Vetter 2020-09-04  70  	ret = drmm_mode_config_init(drm);
c2c25c1cf96927a Daniel Vetter 2020-09-04  71  	if (ret)
c2c25c1cf96927a Daniel Vetter 2020-09-04  72  		return ret;
4f2a8f5898ecd80 Joel Stanley  2019-04-03  73  
4f2a8f5898ecd80 Joel Stanley  2019-04-03  74  	drm->mode_config.min_width = 0;
4f2a8f5898ecd80 Joel Stanley  2019-04-03  75  	drm->mode_config.min_height = 0;
4f2a8f5898ecd80 Joel Stanley  2019-04-03  76  	drm->mode_config.max_width = 800;
4f2a8f5898ecd80 Joel Stanley  2019-04-03  77  	drm->mode_config.max_height = 600;
4f2a8f5898ecd80 Joel Stanley  2019-04-03  78  	drm->mode_config.funcs = &aspeed_gfx_mode_config_funcs;
c2c25c1cf96927a Daniel Vetter 2020-09-04  79  
c2c25c1cf96927a Daniel Vetter 2020-09-04 @80  	return ret;

This should just be "return 0;"

4f2a8f5898ecd80 Joel Stanley  2019-04-03  81  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org 
_______________________________________________
kbuild mailing list -- kbuild@...ts.01.org
To unsubscribe send an email to kbuild-leave@...ts.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ