net: openvswitch: conntrack: simplify the return expression of ovs_ct_limit_get_defau...
authorZheng Yongjun <zhengyongjun3@huawei.com>
Tue, 8 Dec 2020 12:13:53 +0000 (20:13 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Apr 2021 06:42:10 +0000 (08:42 +0200)
[ Upstream commit 5e359044c107ecbdc2e9b3fd5ce296006e6de4bc ]

Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Reviewed-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/openvswitch/conntrack.c

index 4beb96139d7763dbe0784e54aa76daf8dc337bd4..96a49aa3a128b7cf8e98be1c1a5d8464460608df 100644 (file)
@@ -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,