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: fae7a699a9 ("opa_vnic: Convert vport_idr to XArray")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
Colin Ian King 2019-04-04 11:04:39 +01:00 committed by Jason Gunthorpe
parent d10bcf947a
commit 4d2e11d42f
1 changed files with 1 additions and 1 deletions

View File

@ -869,7 +869,7 @@ static void opa_vnic_event(struct ib_event_handler *handler,
record->event, dev_name(&record->device->dev),
record->element.port_num);
if (record->event != IB_EVENT_PORT_ERR ||
if (record->event != IB_EVENT_PORT_ERR &&
record->event != IB_EVENT_PORT_ACTIVE)
return;