OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc0565c
)
xfrm: remove the unnecessary checking before call xfrm_pol_hold
author
Li RongQing
<roy.qing.li@gmail.com>
Thu, 30 Apr 2015 09:13:41 +0000
(17:13 +0800)
committer
Steffen Klassert
<steffen.klassert@secunet.com>
Tue, 5 May 2015 07:27:00 +0000
(09:27 +0200)
xfrm_pol_hold will check its input with NULL
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_policy.c
patch
|
blob
|
history
diff --git
a/net/xfrm/xfrm_policy.c
b/net/xfrm/xfrm_policy.c
index
c4c47f3
..
435bc0d
100644
(file)
--- a/
net/xfrm/xfrm_policy.c
+++ b/
net/xfrm/xfrm_policy.c
@@
-1127,8
+1127,8
@@
static struct xfrm_policy *xfrm_policy_lookup_bytype(struct net *net, u8 type,
break;
}
}
- if (ret)
-
xfrm_pol_hold(ret);
+
+ xfrm_pol_hold(ret);
fail:
read_unlock_bh(&net->xfrm.xfrm_policy_lock);
@@
-3211,8
+3211,7
@@
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);