From e91874d860b2938d61237d9637e48f5eb9a28fc9 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 15 May 2021 22:51:21 +0000 Subject: [PATCH] qla2x00t-32gbit: Remove unneeded if-null-free check Eliminate the following coccicheck warning: drivers/scsi/qla2xxx/qla_os.c:4622:2-7: WARNING: NULL check before some freeing functions is not needed. drivers/scsi/qla2xxx/qla_os.c:4637:3-8: WARNING: NULL check before some freeing functions is not needed. Link: https://lore.kernel.org/r/20210409120925.7122-1-linqiheng@huawei.com Reviewed-by: Himanshu Madhani Signed-off-by: Qiheng Lin Signed-off-by: Martin K. Petersen [ commit efd2617100d9c6a49c8cd27160a2353b04844d78 upstream ] git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9413 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t-32gbit/qla_os.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index 67d1f788d..6061a7593 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -4666,8 +4666,7 @@ qla2x00_free_fw_dump(struct qla_hw_data *ha) dma_free_coherent(&ha->pdev->dev, EFT_SIZE, ha->eft, ha->eft_dma); - if (ha->fw_dump) - vfree(ha->fw_dump); + vfree(ha->fw_dump); ha->fce = NULL; ha->fce_dma = 0; @@ -4681,8 +4680,7 @@ qla2x00_free_fw_dump(struct qla_hw_data *ha) ha->fw_dump_len = 0; for (j = 0; j < 2; j++, fwdt++) { - if (fwdt->template) - vfree(fwdt->template); + vfree(fwdt->template); fwdt->template = NULL; fwdt->length = 0; }