All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/gpu/drm/aspeed/aspeed_gfx_drv.c:80:9: warning: Identical condition 'ret', second condition is always false
@ 2020-10-27 13:03 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-10-27 13:03 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2430 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Daniel Vetter <daniel.vetter@ffwll.ch>

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
date:   7 weeks ago
:::::: branch date: 14 hours ago
:::::: commit date: 7 weeks ago
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@intel.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

4f2a8f5898ecd80 Joel Stanley  2019-04-03  65  
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;
4f2a8f5898ecd80 Joel Stanley  2019-04-03  81  }
4f2a8f5898ecd80 Joel Stanley  2019-04-03  82  

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

^ permalink raw reply	[flat|nested] 2+ messages in thread
* drivers/gpu/drm/aspeed/aspeed_gfx_drv.c:80:9: warning: Identical condition 'ret', second condition is always false
@ 2020-10-27 17:52 Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2020-10-27 17:52 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2326 bytes --]

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@intel.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(a)lists.01.org 
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-27 17:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-27 13:03 drivers/gpu/drm/aspeed/aspeed_gfx_drv.c:80:9: warning: Identical condition 'ret', second condition is always false kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-10-27 17:52 Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.