mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 22:54:05 +08:00
scsi: qedi: Remove redundant NULL check
kfree_skb() handles a NULL skb argument so the additional check is unnecessary. Remove it. Link: https://lore.kernel.org/r/20200827092606.32148-1-vulab@iscas.ac.cn Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
cc770ce34a
commit
9535f2152a
@ -789,8 +789,7 @@ static void qedi_ll2_free_skbs(struct qedi_ctx *qedi)
|
|||||||
spin_lock_bh(&qedi->ll2_lock);
|
spin_lock_bh(&qedi->ll2_lock);
|
||||||
list_for_each_entry_safe(work, work_tmp, &qedi->ll2_skb_list, list) {
|
list_for_each_entry_safe(work, work_tmp, &qedi->ll2_skb_list, list) {
|
||||||
list_del(&work->list);
|
list_del(&work->list);
|
||||||
if (work->skb)
|
kfree_skb(work->skb);
|
||||||
kfree_skb(work->skb);
|
|
||||||
kfree(work);
|
kfree(work);
|
||||||
}
|
}
|
||||||
spin_unlock_bh(&qedi->ll2_lock);
|
spin_unlock_bh(&qedi->ll2_lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user