diff options
author | Xu Wang <vulab@iscas.ac.cn> | 2020-08-27 09:26:06 +0000 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-09-01 22:14:49 -0400 |
commit | 9535f2152acec91df0d293e4b0b8c20b618fc44e (patch) | |
tree | d9708d5e326483235ddf26e78d76a8523cf1e552 | |
parent | cc770ce34aeeff21991f162f0db1a758ea672727 (diff) | |
download | linux-9535f2152acec91df0d293e4b0b8c20b618fc44e.tar.bz2 |
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>
-rw-r--r-- | drivers/scsi/qedi/qedi_main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index 6f038ae5efca..e42437ec23a8 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main.c @@ -789,8 +789,7 @@ static void qedi_ll2_free_skbs(struct qedi_ctx *qedi) spin_lock_bh(&qedi->ll2_lock); list_for_each_entry_safe(work, work_tmp, &qedi->ll2_skb_list, list) { list_del(&work->list); - if (work->skb) - kfree_skb(work->skb); + kfree_skb(work->skb); kfree(work); } spin_unlock_bh(&qedi->ll2_lock); |