* [PATCH] scsi: qedi: Remove redundant null check
@ 2020-08-27 9:26 Xu Wang
2020-09-09 2:09 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Xu Wang @ 2020-08-27 9:26 UTC (permalink / raw)
To: QLogic-Storage-Upstream, jejb, martin.petersen; +Cc: linux-scsi, linux-kernel
Because kfree_skb already checked NULL skb parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
drivers/scsi/qedi/qedi_main.c | 3 +--
1 file changed, 1 insertion(+), 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);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: qedi: Remove redundant null check
2020-08-27 9:26 [PATCH] scsi: qedi: Remove redundant null check Xu Wang
@ 2020-09-09 2:09 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2020-09-09 2:09 UTC (permalink / raw)
To: QLogic-Storage-Upstream, jejb, Xu Wang
Cc: Martin K . Petersen, linux-scsi, linux-kernel
On Thu, 27 Aug 2020 09:26:06 +0000, Xu Wang wrote:
> Because kfree_skb already checked NULL skb parameter,
> so the additional check is unnecessary, just remove it.
Applied to 5.10/scsi-queue, thanks!
[1/1] scsi: qedi: Remove redundant NULL check
https://git.kernel.org/mkp/scsi/c/9535f2152ace
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-09 2:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 9:26 [PATCH] scsi: qedi: Remove redundant null check Xu Wang
2020-09-09 2:09 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).