From: kbuild test robot <fengguang.wu@intel.com>
To: stephen hemminger <stephen@networkplumber.org>
Cc: kbuild-all@01.org, Stephen Hemminger <sthemmin@microsoft.com>,
"K. Y. Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
devel@linuxdriverproject.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] netvsc: fix ptr_ret.cocci warnings
Date: Sat, 22 Jul 2017 02:54:43 +0800 [thread overview]
Message-ID: <20170721185443.GA18015@lkp-g5.lkp.intel.com> (raw)
In-Reply-To: <201707220239.K3AMBOuR%fengguang.wu@intel.com>
drivers/net/hyperv/netvsc_drv.c:737:8-14: WARNING: PTR_ERR_OR_ZERO can be used
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Generated by: scripts/coccinelle/api/ptr_ret.cocci
Fixes: 9749fed5d43d ("netvsc: use ERR_PTR to avoid dereference issues")
CC: stephen hemminger <stephen@networkplumber.org>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
netvsc_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -734,7 +734,7 @@ static int netvsc_set_queues(struct net_
return ret;
net_device = rndis_filter_device_add(dev, &device_info);
- return IS_ERR(net_device) ? PTR_ERR(net_device) : 0;
+ return PTR_ERR_OR_ZERO(net_device);
}
static int netvsc_set_channels(struct net_device *net,
next parent reply other threads:[~2017-07-21 18:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201707220239.K3AMBOuR%fengguang.wu@intel.com>
2017-07-21 18:54 ` kbuild test robot [this message]
2017-07-24 23:20 ` [PATCH] netvsc: fix ptr_ret.cocci warnings David Miller
2017-07-24 23:21 ` Stephen Hemminger
2017-07-24 23:32 ` David Miller
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=20170721185443.GA18015@lkp-g5.lkp.intel.com \
--to=fengguang.wu@intel.com \
--cc=devel@linuxdriverproject.org \
--cc=haiyangz@microsoft.com \
--cc=kbuild-all@01.org \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=sthemmin@microsoft.com \
/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).