Skip to content

Commit

Permalink
qla1280: Remove redundant NULL check before release_firmware() call
Browse files Browse the repository at this point in the history
release_firmware() checks for NULL pointers internally so checking
before calling the function is redundant.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Jesper Juhl authored and Jiri Kosina committed Apr 30, 2012
1 parent 3cc6e78 commit 90449e5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/scsi/qla1280.c
Original file line number Diff line number Diff line change
Expand Up @@ -4473,17 +4473,14 @@ qla1280_exit(void)
pci_unregister_driver(&qla1280_pci_driver);
/* release any allocated firmware images */
for (i = 0; i < QL_NUM_FW_IMAGES; i++) {
if (qla1280_fw_tbl[i].fw) {
release_firmware(qla1280_fw_tbl[i].fw);
qla1280_fw_tbl[i].fw = NULL;
}
release_firmware(qla1280_fw_tbl[i].fw);
qla1280_fw_tbl[i].fw = NULL;
}
}

module_init(qla1280_init);
module_exit(qla1280_exit);


MODULE_AUTHOR("Qlogic & Jes Sorensen");
MODULE_DESCRIPTION("Qlogic ISP SCSI (qla1x80/qla1x160) driver");
MODULE_LICENSE("GPL");
Expand Down

0 comments on commit 90449e5

Please sign in to comment.