summary refs log tree commit diff
path: root/drivers/infiniband/hw/cxgb4/cm.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/cm.c
parentfa8f11586a963ad484d43e0728ef42f378a85768 (diff)
downloadlinux-26f91da29650177364564d8183907d0229e9afbc.tar.gz
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 'drivers/infiniband/hw/cxgb4/cm.c')
-rw-r--r--drivers/infiniband/hw/cxgb4/cm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 0f83cbec33f3..615413bd3e8d 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -403,8 +403,7 @@ void _c4iw_free_ep(struct kref *kref)
 				 ep->com.local_addr.ss_family);
 		dst_release(ep->dst);
 		cxgb4_l2t_release(ep->l2t);
-		if (ep->mpa_skb)
-			kfree_skb(ep->mpa_skb);
+		kfree_skb(ep->mpa_skb);
 	}
 	if (!skb_queue_empty(&ep->com.ep_skb_list))
 		skb_queue_purge(&ep->com.ep_skb_list);