Re: [PATCH 19/26] [SCSI] qla2xxx: Remove redundant NULL check before release_firmware() call.

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





On Mon, 9 Apr 2012, Jesper Juhl wrote:

release_firmware() checks for NULL pointers internally so checking
before calling it is redundant.

Signed-off-by: Jesper Juhl <jj@xxxxxxxxxxxxx>
---
drivers/scsi/qla2xxx/qla_os.c |    3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index a2f9992..91b6fe6 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -4106,8 +4106,7 @@ qla2x00_release_firmware(void)

      mutex_lock(&qla_fw_lock);
      for (idx = 0; idx < FW_BLOBS; idx++)
-             if (qla_fw_blobs[idx].fw)
-                     release_firmware(qla_fw_blobs[idx].fw);
+             release_firmware(qla_fw_blobs[idx].fw);
      mutex_unlock(&qla_fw_lock);
}



Acked-by: Chad Dupuis <chad.dupuis@xxxxxxxxxx>

This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.

--
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


[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Photos]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux