ipv6: propagate genlmsg_reply return code
diff mbox series

Message ID 1549884740-11918-1-git-send-email-lirongqing@baidu.com
State Accepted
Delegated to: David Miller
Headers show
Series
  • ipv6: propagate genlmsg_reply return code
Related show

Commit Message

Li RongQing Feb. 11, 2019, 11:32 a.m. UTC
genlmsg_reply can fail, so propagate its return code

Fixes: 915d7e5e593 ("ipv6: sr: add code base for control plane support of SR-IPv6")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 net/ipv6/seg6.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

David Miller Feb. 12, 2019, 5:37 p.m. UTC | #1
From: Li RongQing <lirongqing@baidu.com>
Date: Mon, 11 Feb 2019 19:32:20 +0800

> genlmsg_reply can fail, so propagate its return code
> 
> Fixes: 915d7e5e593 ("ipv6: sr: add code base for control plane support of SR-IPv6")
> Signed-off-by: Li RongQing <lirongqing@baidu.com>

Applied.

Patch
diff mbox series

diff --git a/net/ipv6/seg6.c b/net/ipv6/seg6.c
index 8d0ba757a46c..9b2f272ca164 100644
--- a/net/ipv6/seg6.c
+++ b/net/ipv6/seg6.c
@@ -221,9 +221,7 @@  static int seg6_genl_get_tunsrc(struct sk_buff *skb, struct genl_info *info)
 	rcu_read_unlock();
 
 	genlmsg_end(msg, hdr);
-	genlmsg_reply(msg, info);
-
-	return 0;
+	return genlmsg_reply(msg, info);
 
 nla_put_failure:
 	rcu_read_unlock();