summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/chelsio/cxgb3
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2018-09-20 17:37:42 +0800
committerDavid S. Miller <davem@davemloft.net>2018-09-21 09:04:37 -0700
commit16a3f50f05985cbea468e043cd18394158eff820 (patch)
tree134fa9b28b4b8aa428877e296c842b535061293e /drivers/net/ethernet/chelsio/cxgb3
parent144a6adfa1435e6235fd55b700d2c9f93345bb7f (diff)
net: cxgb3: 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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb3')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
index 50cd660732c5..84604aff53ce 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
@@ -1302,8 +1302,7 @@ void cxgb3_offload_deactivate(struct adapter *adapter)
rcu_read_unlock();
RCU_INIT_POINTER(tdev->l2opt, NULL);
call_rcu(&d->rcu_head, clean_l2_data);
- if (t->nofail_skb)
- kfree_skb(t->nofail_skb);
+ kfree_skb(t->nofail_skb);
kfree(t);
}