Skip to content

Commit 75e167c

Browse files
committed
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley: "Two small fixes, both in drivers. The mptsas one is really fixing an error path issue where it can leave the misc driver loaded even though the sas driver fails to initialize" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: qla2xxx: Fix double free of dsd_list during driver load scsi: mpt3sas: Fix in error path
2 parents 659eaa0 + 097c063 commit 75e167c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

drivers/scsi/mpt3sas/mpt3sas_scsih.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12913,8 +12913,10 @@ _mpt3sas_init(void)
1291312913
mpt3sas_ctl_init(hbas_to_enumerate);
1291412914

1291512915
error = pci_register_driver(&mpt3sas_driver);
12916-
if (error)
12916+
if (error) {
12917+
mpt3sas_ctl_exit(hbas_to_enumerate);
1291712918
scsih_exit();
12919+
}
1291812920

1291912921
return error;
1292012922
}

drivers/scsi/qla2xxx/qla_os.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4953,7 +4953,7 @@ qla2x00_mem_free(struct qla_hw_data *ha)
49534953
ha->gid_list = NULL;
49544954
ha->gid_list_dma = 0;
49554955

4956-
if (!list_empty(&ha->base_qpair->dsd_list)) {
4956+
if (ha->base_qpair && !list_empty(&ha->base_qpair->dsd_list)) {
49574957
struct dsd_dma *dsd_ptr, *tdsd_ptr;
49584958

49594959
/* clean up allocated prev pool */

0 commit comments

Comments
 (0)