RDMA/ocrdma: Fix a sparse warning
authorSelvin Xavier <selvin.xavier@emulex.com>
Tue, 10 Jun 2014 14:02:26 +0000 (19:32 +0530)
committerRoland Dreier <roland@purestorage.com>
Fri, 1 Aug 2014 22:07:49 +0000 (15:07 -0700)
Fix the warning about the usage of plain integer as NULL pointer.

Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/ocrdma/ocrdma_hw.c

index 105659d..a4d27c7 100644 (file)
@@ -661,7 +661,7 @@ static void ocrdma_dispatch_ibevent(struct ocrdma_dev *dev,
 {
        struct ocrdma_qp *qp = NULL;
        struct ocrdma_cq *cq = NULL;
-       struct ib_event ib_evt = { 0 };
+       struct ib_event ib_evt;
        int cq_event = 0;
        int qp_event = 1;
        int srq_event = 0;
@@ -674,6 +674,8 @@ static void ocrdma_dispatch_ibevent(struct ocrdma_dev *dev,
        if (cqe->cqvalid_cqid & OCRDMA_AE_MCQE_CQVALID)
                cq = dev->cq_tbl[cqe->cqvalid_cqid & OCRDMA_AE_MCQE_CQID_MASK];
 
+       memset(&ib_evt, 0, sizeof(ib_evt));
+
        ib_evt.device = &dev->ibdev;
 
        switch (type) {