Commit 4d2e11d4 authored by Colin Ian King's avatar Colin Ian King Committed by Jason Gunthorpe

opa_vnic: fix check on record->event, incorrect operator used

The check on record->event is always true because the wrong operator
is being used, used && instead of ||

Addresses-Coverity: ("Constant expression result")
Fixes: fae7a699 ("opa_vnic: Convert vport_idr to XArray")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: default avatarMukesh Ojha <mojha@codeaurora.org>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent d10bcf94
...@@ -869,7 +869,7 @@ static void opa_vnic_event(struct ib_event_handler *handler, ...@@ -869,7 +869,7 @@ static void opa_vnic_event(struct ib_event_handler *handler,
record->event, dev_name(&record->device->dev), record->event, dev_name(&record->device->dev),
record->element.port_num); record->element.port_num);
if (record->event != IB_EVENT_PORT_ERR || if (record->event != IB_EVENT_PORT_ERR &&
record->event != IB_EVENT_PORT_ACTIVE) record->event != IB_EVENT_PORT_ACTIVE)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment