netvsc: fix ptr_ret.cocci warnings
authorWu Fengguang <fengguang.wu@intel.com>
Fri, 21 Jul 2017 18:54:43 +0000 (02:54 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Jul 2017 23:20:06 +0000 (16:20 -0700)
commit1bb79284fcf9ebacff16ea0b81b3d5b86528cfd4
tree62146acff26ec842bf6477cabaef87663886ca89
parent71085745ec72969708ef79ef80c5e3babfef2957
netvsc: fix ptr_ret.cocci warnings

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc_drv.c