public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [kbuild] net/core/devlink.c:4415:9: warning: Identical condition 'err', second condition is always false
@ 2020-11-12 11:00 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2020-11-12 11:00 UTC (permalink / raw)
  To: kbuild, Aya Levin
  Cc: lkp, kbuild-all, linux-kernel, Saeed Mahameed, Jiri Pirko

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git  master
head:   3d5e28bff7ad55aea081c1af516cc1c94a5eca7d
commit: 573ed90aa5e23b512168400ba6d65e592081944e devlink: Force enclosing array on binary fmsg data
compiler: riscv64-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)

>> net/core/devlink.c:4415:9: warning: Identical condition 'err', second condition is always false [identicalConditionAfterEarlyExit]
    return err;
           ^
   net/core/devlink.c:4411:6: note: first condition
    if (err)
        ^
   net/core/devlink.c:4415:9: note: second condition
    return err;
           ^

vim +/err +4415 net/core/devlink.c

573ed90aa5e23b Aya Levin       2020-02-11  4405  int devlink_fmsg_binary_pair_nest_start(struct devlink_fmsg *fmsg,
573ed90aa5e23b Aya Levin       2020-02-11  4406  					const char *name)
573ed90aa5e23b Aya Levin       2020-02-11  4407  {
573ed90aa5e23b Aya Levin       2020-02-11  4408  	int err;
573ed90aa5e23b Aya Levin       2020-02-11  4409  
573ed90aa5e23b Aya Levin       2020-02-11  4410  	err = devlink_fmsg_arr_pair_nest_start(fmsg, name);
573ed90aa5e23b Aya Levin       2020-02-11  4411  	if (err)
573ed90aa5e23b Aya Levin       2020-02-11  4412  		return err;
573ed90aa5e23b Aya Levin       2020-02-11  4413  
573ed90aa5e23b Aya Levin       2020-02-11  4414  	fmsg->putting_binary = true;
573ed90aa5e23b Aya Levin       2020-02-11 @4415  	return err;

Just "return 0;"

573ed90aa5e23b Aya Levin       2020-02-11  4416  }

---
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-11-12 11:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-12 11:00 [kbuild] net/core/devlink.c:4415:9: warning: Identical condition 'err', 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