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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux