[ovs-dev] [PATCH net-next v2 4/5] net: openvswitch: make EINVAL return value more obvious
xiangxia.m.yue at gmail.com
xiangxia.m.yue at gmail.com
Thu Apr 16 10:17:02 UTC 2020
From: Tonghao Zhang <xiangxia.m.yue at gmail.com>
Cc: Pravin B Shelar <pshelar at ovn.org>
Cc: Andy Zhou <azhou at ovn.org>
Signed-off-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
---
net/openvswitch/meter.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c
index f552c64ae8df..77fe39cf4f18 100644
--- a/net/openvswitch/meter.c
+++ b/net/openvswitch/meter.c
@@ -390,9 +390,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))
--
2.23.0
More information about the dev
mailing list