提交 586f2eb4 编写于 作者: L Li RongQing 提交者: Steffen Klassert

xfrm: remove the unnecessary checking before call xfrm_pol_hold

xfrm_pol_hold will check its input with NULL
Signed-off-by: NLi RongQing <roy.qing.li@gmail.com>
Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
上级 dc0565ce
...@@ -1127,7 +1127,7 @@ static struct xfrm_policy *xfrm_policy_lookup_bytype(struct net *net, u8 type, ...@@ -1127,7 +1127,7 @@ static struct xfrm_policy *xfrm_policy_lookup_bytype(struct net *net, u8 type,
break; break;
} }
} }
if (ret)
xfrm_pol_hold(ret); xfrm_pol_hold(ret);
fail: fail:
read_unlock_bh(&net->xfrm.xfrm_policy_lock); read_unlock_bh(&net->xfrm.xfrm_policy_lock);
...@@ -3211,7 +3211,6 @@ static struct xfrm_policy *xfrm_migrate_policy_find(const struct xfrm_selector * ...@@ -3211,7 +3211,6 @@ static struct xfrm_policy *xfrm_migrate_policy_find(const struct xfrm_selector *
} }
} }
if (ret)
xfrm_pol_hold(ret); xfrm_pol_hold(ret);
read_unlock_bh(&net->xfrm.xfrm_policy_lock); read_unlock_bh(&net->xfrm.xfrm_policy_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册