Thread (48 messages) 48 messages, 5 authors, 2020-04-24
STALE2255d
Revisions (3)
  1. v2 current
  2. v3 [diff vs current]
  3. v4 [diff vs current]

[PATCH net-next v2 4/5] net: openvswitch: make EINVAL return value more obvious

From: <hidden>
Date: 2020-04-18 17:25:23
Subsystem: networking [general], openvswitch, the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Aaron Conole, Eelco Chaudron, Ilya Maximets, Linus Torvalds

From: Tonghao Zhang <redacted>

Cc: Pravin B Shelar <redacted>
Cc: Andy Zhou <redacted>
Signed-off-by: Tonghao Zhang <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help