net: hisilicon: fix ptr_ret.cocci warnings
authorWu Fengguang <fengguang.wu@intel.com>
Tue, 20 Oct 2015 06:56:00 +0000 (14:56 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Oct 2015 02:38:26 +0000 (19:38 -0700)
commitc6aa74d546ccb94c99a1e95fb461f8b0e9410a3e
tree02a727654ec1ee60e2f2f0f038308894acf9cfdb
parentfeec0cb3f20b837f8ca36e974267918d7a4497f8
net: hisilicon: fix ptr_ret.cocci warnings

drivers/net/ethernet/hisilicon/hns/hnae.c:442:1-3: 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

CC: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns/hnae.c