projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc770ce
)
scsi: qedi: Remove redundant NULL check
author
Xu Wang
<vulab@iscas.ac.cn>
Thu, 27 Aug 2020 09:26:06 +0000
(09:26 +0000)
committer
Martin K. Petersen
<martin.petersen@oracle.com>
Wed, 2 Sep 2020 02:14:49 +0000
(22:14 -0400)
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>
drivers/scsi/qedi/qedi_main.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/qedi/qedi_main.c
b/drivers/scsi/qedi/qedi_main.c
index 6f038ae5efcafc00560cb19b97f1ddab788475d1..e42437ec23a832ea779faf80996e5183c7ea6ecd 100644
(file)
--- 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);