Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6f5e017 authored by kbuild test robot's avatar kbuild test robot Committed by Steffen Klassert
Browse files

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: 44e2b838 ("xfrm: Return detailed errors from xfrmi_newlink")
CC: Benedict Wong <benedictwong@google.com>
Signed-off-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent 44e2b838
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -689,10 +689,7 @@ static int xfrmi_newlink(struct net *src_net, struct net_device *dev,
	nla_strlcpy(p->name, tb[IFLA_IFNAME], IFNAMSIZ);

	xi = xfrmi_locate(net, p, 1);
	if (IS_ERR(xi))
		return PTR_ERR(xi);

	return 0;
	return PTR_ERR_OR_ZERO(xi);
}

static void xfrmi_dellink(struct net_device *dev, struct list_head *head)