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>
This commit is contained in:
parent
a8e387384f
commit
c773500890
@ -419,9 +419,8 @@ static int ovs_meter_cmd_set(struct sk_buff *skb, struct genl_info *info)
|
|||||||
u32 meter_id;
|
u32 meter_id;
|
||||||
bool failed;
|
bool failed;
|
||||||
|
|
||||||
if (!a[OVS_METER_ATTR_ID]) {
|
if (!a[OVS_METER_ATTR_ID])
|
||||||
return -ENODEV;
|
return -EINVAL;
|
||||||
}
|
|
||||||
|
|
||||||
meter = dp_meter_create(a);
|
meter = dp_meter_create(a);
|
||||||
if (IS_ERR_OR_NULL(meter))
|
if (IS_ERR_OR_NULL(meter))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user