diff mbox

cxgb4: missing dereference in poll_cq

Message ID 1476113253-16880-1-git-send-email-hch@lst.de (mailing list archive)
State Accepted
Headers show

Commit Message

Christoph Hellwig Oct. 10, 2016, 3:27 p.m. UTC
Sparse complains about using plain integer as NULL pointer here, but
I suspect we really want to check the value anyway, and Steve
confirmed that's indeed the case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Steve Wise <swise@opengridcomputing.com>
---
 providers/cxgb4/cq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Leon Romanovsky Oct. 13, 2016, 8:58 a.m. UTC | #1
On Mon, Oct 10, 2016 at 05:27:33PM +0200, Christoph Hellwig wrote:
> Sparse complains about using plain integer as NULL pointer here, but
> I suspect we really want to check the value anyway, and Steve
> confirmed that's indeed the case.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Acked-by: Steve Wise <swise@opengridcomputing.com>

Thanks, applied.
diff mbox

Patch

diff --git a/providers/cxgb4/cq.c b/providers/cxgb4/cq.c
index 1ed7dfd..3c8dd26 100644
--- a/providers/cxgb4/cq.c
+++ b/providers/cxgb4/cq.c
@@ -438,7 +438,7 @@  static int poll_cq(struct t4_wq *wq, struct t4_cq *cq, struct t4_cqe *cqe,
 		if (!*cqe_flushed && CQE_STATUS(hw_cqe))
 			dump_cqe(hw_cqe);
 
-		BUG_ON((cqe_flushed == 0) && !SW_CQE(hw_cqe));
+		BUG_ON((*cqe_flushed == 0) && !SW_CQE(hw_cqe));
 		goto proc_cqe;
 	}