diff mbox

[v2] qedr: remove pointless NULL check in qedr_post_send()

Message ID 1478092292-17225-1-git-send-email-weiyj.lk@gmail.com (mailing list archive)
State Accepted
Headers show

Commit Message

Wei Yongjun Nov. 2, 2016, 1:11 p.m. UTC
From: Wei Yongjun <weiyongjun1@huawei.com>

Remove pointless NULL check for 'wr' in qedr_post_send().

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
v1 -> v2: remove pointless NULL check as Ram's suggestion
---
 drivers/infiniband/hw/qedr/verbs.c | 5 -----
 1 file changed, 5 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Amrani, Ram Nov. 3, 2016, 6:24 a.m. UTC | #1
> diff --git a/drivers/infiniband/hw/qedr/verbs.c
> b/drivers/infiniband/hw/qedr/verbs.c
> index a615142..ed7521a 100644
> --- a/drivers/infiniband/hw/qedr/verbs.c
> +++ b/drivers/infiniband/hw/qedr/verbs.c
> @@ -2981,11 +2981,6 @@ int qedr_post_send(struct ib_qp *ibqp, struct
> ib_send_wr *wr,
>  		return -EINVAL;
>  	}
> 
> -	if (!wr) {
> -		DP_ERR(dev, "Got an empty post send.\n");
> -		return -EINVAL;
> -	}
> -
>  	while (wr) {
>  		rc = __qedr_post_send(ibqp, wr, bad_wr);
>  		if (rc)

Thanks Wei.

Acked-by: Ram Amrani <Ram.Amrani@cavium.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Doug Ledford Dec. 14, 2016, 4:28 p.m. UTC | #2
On 11/2/2016 9:11 AM, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Remove pointless NULL check for 'wr' in qedr_post_send().
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Thanks, applied.
diff mbox

Patch

diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
index a615142..ed7521a 100644
--- a/drivers/infiniband/hw/qedr/verbs.c
+++ b/drivers/infiniband/hw/qedr/verbs.c
@@ -2981,11 +2981,6 @@  int qedr_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
 		return -EINVAL;
 	}
 
-	if (!wr) {
-		DP_ERR(dev, "Got an empty post send.\n");
-		return -EINVAL;
-	}
-
 	while (wr) {
 		rc = __qedr_post_send(ibqp, wr, bad_wr);
 		if (rc)