diff mbox

[for-next,15/15] RDMA/ocrdma: Fixing a sparse warning

Message ID 16798461-18bb-4b6a-a1a0-183ecac2ad92@CMEXHTCAS1.ad.emulex.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Selvin Xavier June 4, 2014, 8:52 a.m. UTC
Fixing the warning about the usage of plain integer as NULL pointer

Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
---
 drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
index 105659d..a4d27c7 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
@@ -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) {