From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bart Van Assche Subject: [PATCH] IB/srpt: Suppress a compiler warning Date: Mon, 30 Mar 2015 12:37:19 +0200 Message-ID: <5519275F.6070102@sandisk.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Roland Dreier Cc: "Nicholas A. Bellinger" , Sagi Grimberg , linux-rdma , David Binderman List-Id: linux-rdma@vger.kernel.org Remove a BUG_ON(!ch) statement because it is superfluous - if the ch pointer would be NULL then the assignment in the first line of srpt_map_sg_to_ib_sge() would trigger a kernel oops anyway. This patch suppresses the following compiler warning: Possible null pointer dereference: ch - otherwise it is redundant to check it against null. Reported-by: David Binderman Signed-off-by: Bart Van Assche --- drivers/infiniband/ulp/srpt/ib_srpt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 6e0a477..4e74fc8 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -1095,7 +1095,6 @@ static int srpt_map_sg_to_ib_sge(struct srpt_rdma_ch *ch, int count, nrdma; int i, j, k; - BUG_ON(!ch); BUG_ON(!ioctx); cmd = &ioctx->cmd; dir = cmd->data_direction; -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html