[PATCH] SCSI-bfa: Delete more unnecessary checks before the function call "vfree"

SF Markus Elfring
2015-02-05T21:07:51Z

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 5 Feb 2015 22:02:16 +0100

The vfree() function performs also input parameter validation.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/scsi/bfa/bfad.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
index e90a374..05c8ca0 100644
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -1810,11 +1810,11 @@ bfad_load_fwimg(struct pci_dev *pdev)
static void
bfad_free_fwimg(void)
{
- if (bfi_image_ct2_size && bfi_image_ct2)
+ if (bfi_image_ct2_size)
vfree(bfi_image_ct2);
- if (bfi_image_ct_size && bfi_image_ct)
+ if (bfi_image_ct_size)
vfree(bfi_image_ct);
- if (bfi_image_cb_size && bfi_image_cb)
+ if (bfi_image_cb_size)
vfree(bfi_image_cb);
}

--
2.2.2