Skip to content

Commit

Permalink
net: openvswitch: make EINVAL return value more obvious
Browse files Browse the repository at this point in the history
Cc: Pravin B Shelar <pshelar@ovn.org>
Cc: Andy Zhou <azhou@ovn.org>
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Tonghao Zhang authored and David S. Miller committed Apr 24, 2020
1 parent a8e3873 commit c773500
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/openvswitch/meter.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,8 @@ static int ovs_meter_cmd_set(struct sk_buff *skb, struct genl_info *info)
u32 meter_id;
bool failed;

if (!a[OVS_METER_ATTR_ID]) {
return -ENODEV;
}
if (!a[OVS_METER_ATTR_ID])
return -EINVAL;

meter = dp_meter_create(a);
if (IS_ERR_OR_NULL(meter))
Expand Down

0 comments on commit c773500

Please sign in to comment.