Skip to content

Commit 8a860c2

Browse files
Wei Yongjundavem330
authored andcommitted
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: 96fbc13 ("openvswitch: Add meter infrastructure") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Pravin B Shelar <pshelar@ovn.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 228aa01 commit 8a860c2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/openvswitch/meter.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ static int ovs_meter_cmd_features(struct sk_buff *skb, struct genl_info *info)
166166

167167
reply = ovs_meter_cmd_reply_start(info, OVS_METER_CMD_FEATURES,
168168
&ovs_reply_header);
169-
if (!reply)
169+
if (IS_ERR(reply))
170170
return PTR_ERR(reply);
171171

172172
if (nla_put_u32(reply, OVS_METER_ATTR_MAX_METERS, U32_MAX) ||

0 commit comments

Comments
 (0)