aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/cxgb4/qp.c
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2018-09-20 17:52:42 +0800
committerDoug Ledford <dledford@redhat.com>2018-09-21 12:00:50 -0400
commit26f91da29650177364564d8183907d0229e9afbc (patch)
tree04fa99d9f12a7272382d695e84ecf1d1ed5d555b /drivers/infiniband/hw/cxgb4/qp.c
parentIB/mlx4: Remove unnecessary parentheses (diff)
downloadlinux-dev-26f91da29650177364564d8183907d0229e9afbc.tar.xz
linux-dev-26f91da29650177364564d8183907d0229e9afbc.zip
RDMA/cxgb4: remove redundant null pointer check before kfree_skb
kfree_skb has taken the null pointer into account. hence it is safe to remove the redundant null pointer check before kfree_skb. Signed-off-by: zhong jiang <zhongjiang@huawei.com> Acked-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to '')
-rw-r--r--drivers/infiniband/hw/cxgb4/qp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
index 347fe18b1a41..e78dd9afac86 100644
--- a/drivers/infiniband/hw/cxgb4/qp.c
+++ b/drivers/infiniband/hw/cxgb4/qp.c
@@ -2813,8 +2813,7 @@ err_free_queue:
free_srq_queue(srq, ucontext ? &ucontext->uctx : &rhp->rdev.uctx,
srq->wr_waitp);
err_free_skb:
- if (srq->destroy_skb)
- kfree_skb(srq->destroy_skb);
+ kfree_skb(srq->destroy_skb);
err_free_srq_idx:
c4iw_free_srq_idx(&rhp->rdev, srq->idx);
err_free_wr_wait: