From: Tonghao Zhang Date: Fri, 24 Apr 2020 00:08:05 +0000 (+0800) Subject: net: openvswitch: make EINVAL return value more obvious X-Git-Tag: v5.8-rc1~165^2~441^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c77350089052cafa8125169e37463ab7028d6a18;p=thirdparty%2Fkernel%2Flinux.git net: openvswitch: make EINVAL return value more obvious Cc: Pravin B Shelar Cc: Andy Zhou Signed-off-by: Tonghao Zhang Acked-by: Pravin B Shelar Signed-off-by: David S. Miller --- diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c index b7893b0d6423a..e36b464b32a56 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))