Skip to content

Commit

Permalink
net: openvswitch: conntrack: simplify the return expression of ovs_ct…
Browse files Browse the repository at this point in the history
…_limit_get_default_limit()

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>
  • Loading branch information
Zheng Yongjun authored and David S. Miller committed Dec 9, 2020
1 parent 8daa76a commit 5e35904
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions net/openvswitch/conntrack.c
Original file line number Diff line number Diff line change
Expand Up @@ -2033,15 +2033,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,
Expand Down

0 comments on commit 5e35904

Please sign in to comment.