opa_vnic: fix check on record->event, incorrect operator used
authorColin Ian King <colin.king@canonical.com>
Thu, 4 Apr 2019 10:04:39 +0000 (11:04 +0100)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 8 Apr 2019 16:05:24 +0000 (13:05 -0300)
The check on record->event is always true because the wrong operator
is being used, used && instead of ||

Addresses-Coverity: ("Constant expression result")
Fixes: fae7a699a925 ("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>
drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c

index 76cd09410d9aaf0b4b23ff7cc025b3f8ddff626b..be5befd92d16870f3baa7f923f49a99a345caa76 100644 (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;