[bug report] genetlink: fix error return code in genl_register_family()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Wei Yongjun,

The patch 22ca904ad70a: "genetlink: fix error return code in
genl_register_family()" from Nov 1, 2016, leads to the following
static checker warning:

	net/netlink/genetlink.c:365 genl_register_family()
	warn: unsigned 'family->id' is never less than zero.

net/netlink/genetlink.c
   362  
   363          family->id = idr_alloc(&genl_fam_idr, family,
   364                                 start, end + 1, GFP_KERNEL);
   365          if (family->id < 0) {
                    ^^^^^^^^^^^^^^
Doesn't work for unsigned int.

   366                  err = family->id;
   367                  goto errout_free;
   368          }
   369  

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux