projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03e6d81
)
af_key: return error if pfkey_xfrm_policy2msg_prep() fails
author
Dan Carpenter
<
[email protected]
>
Wed, 24 Mar 2010 01:47:00 +0000
(
01:47
+0000)
committer
David S. Miller
<
[email protected]
>
Wed, 24 Mar 2010 20:28:27 +0000
(13:28 -0700)
The original code saved the error value but just returned 0 in the end.
Signed-off-by: Dan Carpenter <
[email protected]
>
Acked-by: Jamal Hadi Salim <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/key/af_key.c
patch
|
blob
|
history
diff --git
a/net/key/af_key.c
b/net/key/af_key.c
index 368707882647bb83293a5be6536b00d6ccca2982..344145f23c34adff8562afa8f4b88f17c1a40677 100644
(file)
--- a/
net/key/af_key.c
+++ b/
net/key/af_key.c
@@
-2129,10
+2129,9
@@
static int key_notify_policy(struct xfrm_policy *xp, int dir, struct km_event *c
int err;
out_skb = pfkey_xfrm_policy2msg_prep(xp);
- if (IS_ERR(out_skb)) {
- err = PTR_ERR(out_skb);
- goto out;
- }
+ if (IS_ERR(out_skb))
+ return PTR_ERR(out_skb);
+
err = pfkey_xfrm_policy2msg(out_skb, xp, dir);
if (err < 0)
return err;
@@
-2148,7
+2147,6
@@
static int key_notify_policy(struct xfrm_policy *xp, int dir, struct km_event *c
out_hdr->sadb_msg_seq = c->seq;
out_hdr->sadb_msg_pid = c->pid;
pfkey_broadcast(out_skb, GFP_ATOMIC, BROADCAST_ALL, NULL, xp_net(xp));
-out:
return 0;
}