aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index c488996cb958..93c0c7e4f08f 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -2154,6 +2154,19 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
2154 } 2154 }
2155 } 2155 }
2156 2156
2157 /* Get memory for cached NVRAM */
2158 ha->nvram = kzalloc(MAX_NVRAM_SIZE, GFP_KERNEL);
2159 if (ha->nvram == NULL) {
2160 /* error */
2161 qla_printk(KERN_WARNING, ha,
2162 "Memory Allocation failed - nvram cache\n");
2163
2164 qla2x00_mem_free(ha);
2165 msleep(100);
2166
2167 continue;
2168 }
2169
2157 /* Done all allocations without any error. */ 2170 /* Done all allocations without any error. */
2158 status = 0; 2171 status = 0;
2159 2172
@@ -2266,6 +2279,7 @@ qla2x00_mem_free(scsi_qla_host_t *ha)
2266 ha->fw_dump_reading = 0; 2279 ha->fw_dump_reading = 0;
2267 2280
2268 vfree(ha->optrom_buffer); 2281 vfree(ha->optrom_buffer);
2282 kfree(ha->nvram);
2269} 2283}
2270 2284
2271/* 2285/*