linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: openvswitch: conntrack: simplify the return expression of ovs_ct_limit_get_default_limit()
@ 2020-12-08 12:13 Zheng Yongjun
  2020-12-08 13:54 ` Eelco Chaudron
  2020-12-09  0:24 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Zheng Yongjun @ 2020-12-08 12:13 UTC (permalink / raw)
  To: pshelar, davem, kuba, netdev, dev, linux-kernel; +Cc: Zheng Yongjun

Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: openvswitch: conntrack: simplify the return expression of ovs_ct_limit_get_default_limit()
  2020-12-08 12:13 [PATCH net-next] net: openvswitch: conntrack: simplify the return expression of ovs_ct_limit_get_default_limit() Zheng Yongjun
@ 2020-12-08 13:54 ` Eelco Chaudron
  2020-12-09  0:24 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Eelco Chaudron @ 2020-12-08 13:54 UTC (permalink / raw)
  To: Zheng Yongjun; +Cc: pshelar, davem, kuba, netdev, dev, linux-kernel



On 8 Dec 2020, at 13:13, Zheng Yongjun wrote:

> Simplify the return expression.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>

Change looks good to me.

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: openvswitch: conntrack: simplify the return expression of ovs_ct_limit_get_default_limit()
  2020-12-08 12:13 [PATCH net-next] net: openvswitch: conntrack: simplify the return expression of ovs_ct_limit_get_default_limit() Zheng Yongjun
  2020-12-08 13:54 ` Eelco Chaudron
@ 2020-12-09  0:24 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-12-09  0:24 UTC (permalink / raw)
  To: zhengyongjun3; +Cc: pshelar, kuba, netdev, dev, linux-kernel

From: Zheng Yongjun <zhengyongjun3@huawei.com>
Date: Tue, 8 Dec 2020 20:13:53 +0800

> Simplify the return expression.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-09  0:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 12:13 [PATCH net-next] net: openvswitch: conntrack: simplify the return expression of ovs_ct_limit_get_default_limit() Zheng Yongjun
2020-12-08 13:54 ` Eelco Chaudron
2020-12-09  0:24 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).