]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/scsi/lpfc/lpfc_init.c
lpfc: Destroy lpfc_hba_index IDR on module exit
[mirror_ubuntu-artful-kernel.git] / drivers / scsi / lpfc / lpfc_init.c
index f962118da8eda9b70d7771771ad8a6537dc41f0f..eaf121a3400ff3f3cabe906d752d797f5a573c5e 100644 (file)
@@ -2253,7 +2253,7 @@ lpfc_get_hba_model_desc(struct lpfc_hba *phba, uint8_t *mdp, uint8_t *descp)
                                phba->Port);
                else if (max_speed == 0)
                        snprintf(descp, 255,
-                               "Emulex %s %s %s ",
+                               "Emulex %s %s %s",
                                m.name, m.bus, m.function);
                else
                        snprintf(descp, 255,
@@ -4982,8 +4982,7 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba)
        }
 
        if (!phba->sli.ring)
-               phba->sli.ring = (struct lpfc_sli_ring *)
-                       kzalloc(LPFC_SLI3_MAX_RING *
+               phba->sli.ring = kzalloc(LPFC_SLI3_MAX_RING *
                        sizeof(struct lpfc_sli_ring), GFP_KERNEL);
        if (!phba->sli.ring)
                return -ENOMEM;
@@ -4995,7 +4994,7 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba)
 
        /* Initialize the host templates the configured values. */
        lpfc_vport_template.sg_tablesize = phba->cfg_sg_seg_cnt;
-       lpfc_template.sg_tablesize = phba->cfg_sg_seg_cnt;
+       lpfc_template_s3.sg_tablesize = phba->cfg_sg_seg_cnt;
 
        /* There are going to be 2 reserved BDEs: 1 FCP cmnd + 1 FCP rsp */
        if (phba->cfg_enable_bg) {
@@ -11477,6 +11476,7 @@ lpfc_exit(void)
                free_pages((unsigned long)_dump_buf_dif, _dump_buf_dif_order);
        }
        kfree(lpfc_used_cpu);
+       idr_destroy(&lpfc_hba_index);
 }
 
 module_init(lpfc_init);