[PATCH net-next] net: openvswitch: conntrack: simplify the return expression of ovs_ct_limit_get_default_limit()

Subsystems: networking [general], openvswitch, the rest

STALE2099d

3 messages, 3 authors, 2020-12-09 · open the first message on its own page

[PATCH net-next] net: openvswitch: conntrack: simplify the return expression of ovs_ct_limit_get_default_limit()

From: Zheng Yongjun <hidden>
Date: 2020-12-08 12:14:48

Simplify the return expression.

Signed-off-by: Zheng Yongjun <redacted>
---
 net/openvswitch/conntrack.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index 4beb96139d77..96a49aa3a128 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -2025,15 +2025,11 @@ static int ovs_ct_limit_get_default_limit(struct ovs_ct_limit_info *info,
 					  struct sk_buff *reply)
 {
 	struct ovs_zone_limit zone_limit;
-	int err;
 
 	zone_limit.zone_id = OVS_ZONE_LIMIT_DEFAULT_ZONE;
 	zone_limit.limit = info->default_limit;
-	err = nla_put_nohdr(reply, sizeof(zone_limit), &zone_limit);
-	if (err)
-		return err;
 
-	return 0;
+	return nla_put_nohdr(reply, sizeof(zone_limit), &zone_limit);
 }
 
 static int __ovs_ct_limit_get_zone_limit(struct net *net,
-- 
2.22.0

Re: [PATCH net-next] net: openvswitch: conntrack: simplify the return expression of ovs_ct_limit_get_default_limit()

From: "Eelco Chaudron" <echaudro@redhat.com>
Date: 2020-12-08 13:56:25


On 8 Dec 2020, at 13:13, Zheng Yongjun wrote:
Simplify the return expression.

Signed-off-by: Zheng Yongjun <redacted>
Change looks good to me.

Reviewed-by: Eelco Chaudron <echaudro@redhat.com>

Re: [PATCH net-next] net: openvswitch: conntrack: simplify the return expression of ovs_ct_limit_get_default_limit()

From: David Miller <davem@davemloft.net>
Date: 2020-12-09 00:25:28

From: Zheng Yongjun <redacted>
Date: Tue, 8 Dec 2020 20:13:53 +0800
Simplify the return expression.

Signed-off-by: Zheng Yongjun <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help