scsi: qla2xxx: Remove redundant NULL check
Subsystems (2)
PATCH 1/1 scsi: qla2xxx: Remove redundant NULL check
Fix warnings reported by coccicheck:
./drivers/scsi/qla2xxx/qla_os.c:4636:2-7: WARNING: NULL check before some freeing functions is not needed. ./drivers/scsi/qla2xxx/qla_os.c:4651:3-8: WARNING: NULL check before some freeing functions is not needed.
Signed-off-by Xu Wang <[email protected]>
--- drivers/scsi/qla2xxx/qla_os.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/qla2xxx/qla_os.c +2 -4
@@ -4632,8 +4632,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 ;
@@ -4647,8 +4646,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 ; }
Signature · 1 line
2.17.1