UPSTREAM: xfrm: fix ptr_ret.cocci warnings
authorkbuild test robot <fengguang.wu@intel.com>
Thu, 26 Jul 2018 07:09:52 +0000 (15:09 +0800)
committerxiest1 <xiest1@lenovo.com>
Tue, 5 Nov 2019 09:32:14 +0000 (17:32 +0800)
commit35b4fe32bbf2ed4a2801ffbeb9f1165cbab143dc
tree036a88366f800b3c46e0f3493ccb29b09d86667c
parent69a00f7a7a11e5829c8d1a80997a110bba1b8f43
UPSTREAM: xfrm: fix ptr_ret.cocci warnings

net/xfrm/xfrm_interface.c:692: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

Fixes: 44e2b838c24d ("xfrm: Return detailed errors from xfrmi_newlink")
CC: Benedict Wong <benedictwong@google.com>
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
(cherry picked from commit c6f5e017df9dfa9f6cbe70da008e7d716d726f1b)
Signed-off-by: Benedict Wong <benedictwong@google.com>
Bug: 113046120
Test: All kernel net-tests run, passing (20x repeated)
Change-Id: I4ec93c0427fded57ff5126dc7b3d97d9b5fd615b
net/xfrm/xfrm_interface.c