Commit efd26171 authored by Qiheng Lin's avatar Qiheng Lin Committed by Martin K. Petersen
Browse files

scsi: qla2xxx: 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: default avatarHimanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: default avatarQiheng Lin <linqiheng@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 16660db3
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -4618,7 +4618,6 @@ 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);

	ha->fce = NULL;
@@ -4633,7 +4632,6 @@ 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);
		fwdt->template = NULL;
		fwdt->length = 0;