diff options
author | Tonghao Zhang <xiangxia.m.yue@gmail.com> | 2020-04-24 08:08:05 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-04-23 18:26:11 -0700 |
commit | c77350089052cafa8125169e37463ab7028d6a18 (patch) | |
tree | 065af39cbf8722060b16655477f27767a78f234b /net/openvswitch | |
parent | a8e387384f554ea0b63889a7682ffcddee24df8b (diff) | |
download | linux-c77350089052cafa8125169e37463ab7028d6a18.tar.bz2 |
net: openvswitch: make EINVAL return value more obvious
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>
Diffstat (limited to 'net/openvswitch')
-rw-r--r-- | net/openvswitch/meter.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c index b7893b0d6423..e36b464b32a5 100644 --- a/net/openvswitch/meter.c +++ b/net/openvswitch/meter.c @@ -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)) |