* [kbuild] 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; only message in thread
From: Dan Carpenter @ 2020-10-27 17:52 UTC (permalink / raw)
To: kbuild, Daniel Vetter; +Cc: lkp, kbuild-all, linux-kernel
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@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-27 17:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-27 17:52 [kbuild] drivers/gpu/drm/aspeed/aspeed_gfx_drv.c:80:9: warning: Identical condition 'ret', second condition is always false Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox