Commit 8a860c2b authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller

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: 96fbc13d ("openvswitch: Add meter infrastructure")
Signed-off-by: default avatarWei Yongjun <[email protected]>
Acked-by: default avatarPravin B Shelar <[email protected]>
Signed-off-by: default avatarDavid S. Miller <[email protected]>
parent 228aa012
......@@ -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,
if (!reply)
if (IS_ERR(reply))
return PTR_ERR(reply);
if (nla_put_u32(reply, OVS_METER_ATTR_MAX_METERS, U32_MAX) ||
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment