Skip to content

Commit

Permalink
opa_vnic: fix check on record->event, incorrect operator used
Browse files Browse the repository at this point in the history
The check on record->event is always true because the wrong operator
is being used, used && instead of ||

Addresses-Coverity: ("Constant expression result")
Fixes: fae7a69 ("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>
  • Loading branch information
Colin Ian King authored and Jason Gunthorpe committed Apr 8, 2019
1 parent d10bcf9 commit 4d2e11d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 4d2e11d

Please sign in to comment.