From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: hv_netvsc: Implement set_channels ethtool op
Date: Fri, 14 Aug 2015 09:08:10 +0000 [thread overview]
Message-ID: <20150814090810.GA6580@mwanda> (raw)
Hello Andrew Schwartzmeyer,
This is a semi-automatic email about new static checker warnings.
The patch b5960e6e2b5c: "hv_netvsc: Implement set_channels ethtool
op" from Aug 11, 2015, leads to the following Smatch complaint:
drivers/net/hyperv/netvsc_drv.c:785 netvsc_set_channels()
warn: variable dereferenced before check 'nvdev' (see line 780)
drivers/net/hyperv/netvsc_drv.c
779 struct netvsc_device_info device_info;
780 const u32 num_chn = nvdev->num_chn;
^^^^^^^^^^^^^^
Deref.
781 const u32 max_chn = min_t(u32, nvdev->max_chn, num_online_cpus());
^^^^^^^^^^^^^^
Deref.
782 int ret = 0;
783 bool recovering = false;
784
785 if (!nvdev || nvdev->destroy)
^^^^^
Check too late.
786 return -ENODEV;
787
regards,
dan carpenter
reply other threads:[~2015-08-14 9:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20150814090810.GA6580@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;
as well as URLs for NNTP newsgroup(s).