* re: hv_netvsc: Implement set_channels ethtool op
@ 2015-08-14 9:08 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2015-08-14 9:08 UTC (permalink / raw)
To: kernel-janitors
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-08-14 9:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-14 9:08 hv_netvsc: Implement set_channels ethtool op Dan Carpenter
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).