From: Wei Yongjun <[email protected]>
Upstream commit:
commit 8a860c2bcc84a8e4fbcabb928cd97e4c51b17d93
Author: Wei Yongjun <[email protected]>
Date: Tue Nov 14 06:20:16 2017 +0000
openvswitch: Fix return value check in ovs_meter_cmd_features()
In case of error, the function ovs_meter_cmd_reply_start() returns
ERR_PTR() not NULL. The NULL test in the return value check should
be replaced with IS_ERR().
Fixes: 96fbc13d7e77 ("openvswitch: Add meter infrastructure")
Signed-off-by: Wei Yongjun <[email protected]>
Acked-by: Pravin B Shelar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Cc: Wei Yongjun <[email protected]>
Signed-off-by: Greg Rose <[email protected]>
---
datapath/meter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/datapath/meter.c b/datapath/meter.c
index 2a5ba35..2e58b6c 100644
--- a/datapath/meter.c
+++ b/datapath/meter.c
@@ -166,7 +166,7 @@ static int ovs_meter_cmd_features(struct sk_buff *skb,
struct genl_info *info)
reply = ovs_meter_cmd_reply_start(info, OVS_METER_CMD_FEATURES,
&ovs_reply_header);
- if (!reply)
+ if (IS_ERR(reply))
return PTR_ERR(reply);
if (nla_put_u32(reply, OVS_METER_ATTR_MAX_METERS, U32_MAX) ||
--
1.8.3.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev