Commit 16a3f50f authored by zhong jiang's avatar zhong jiang Committed by David S. Miller

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: default avatarzhong jiang <zhongjiang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 144a6adf
...@@ -1302,8 +1302,7 @@ void cxgb3_offload_deactivate(struct adapter *adapter) ...@@ -1302,8 +1302,7 @@ void cxgb3_offload_deactivate(struct adapter *adapter)
rcu_read_unlock(); rcu_read_unlock();
RCU_INIT_POINTER(tdev->l2opt, NULL); RCU_INIT_POINTER(tdev->l2opt, NULL);
call_rcu(&d->rcu_head, clean_l2_data); call_rcu(&d->rcu_head, clean_l2_data);
if (t->nofail_skb) kfree_skb(t->nofail_skb);
kfree_skb(t->nofail_skb);
kfree(t); kfree(t);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment