public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [bug report] genetlink: fix error return code in genl_register_family()
Date: Wed, 09 Nov 2016 09:56:13 +0000	[thread overview]
Message-ID: <20161109095613.GA24471@mwanda> (raw)

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

             reply	other threads:[~2016-11-09  9:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-09  9:56 Dan Carpenter [this message]
2016-11-09 22:43 ` [bug report] genetlink: fix error return code in genl_register_family() Cong Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161109095613.GA24471@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox