.. | .. |
---|
5834 | 5834 | { |
---|
5835 | 5835 | struct Scsi_Host *sh; |
---|
5836 | 5836 | |
---|
5837 | | - sh = scsi_host_alloc(&hpsa_driver_template, sizeof(h)); |
---|
| 5837 | + sh = scsi_host_alloc(&hpsa_driver_template, sizeof(struct ctlr_info)); |
---|
5838 | 5838 | if (sh == NULL) { |
---|
5839 | 5839 | dev_err(&h->pdev->dev, "scsi_host_alloc failed\n"); |
---|
5840 | 5840 | return -ENOMEM; |
---|
.. | .. |
---|
8904 | 8904 | destroy_workqueue(h->monitor_ctlr_wq); |
---|
8905 | 8905 | h->monitor_ctlr_wq = NULL; |
---|
8906 | 8906 | } |
---|
8907 | | - kfree(h); |
---|
| 8907 | + hpda_free_ctlr_info(h); |
---|
8908 | 8908 | return rc; |
---|
8909 | 8909 | } |
---|
8910 | 8910 | |
---|
.. | .. |
---|
9764 | 9764 | return 0; |
---|
9765 | 9765 | |
---|
9766 | 9766 | free_sas_phy: |
---|
9767 | | - hpsa_free_sas_phy(hpsa_sas_phy); |
---|
| 9767 | + sas_phy_free(hpsa_sas_phy->phy); |
---|
| 9768 | + kfree(hpsa_sas_phy); |
---|
9768 | 9769 | free_sas_port: |
---|
9769 | 9770 | hpsa_free_sas_port(hpsa_sas_port); |
---|
9770 | 9771 | free_sas_node: |
---|
.. | .. |
---|
9800 | 9801 | |
---|
9801 | 9802 | rc = hpsa_sas_port_add_rphy(hpsa_sas_port, rphy); |
---|
9802 | 9803 | if (rc) |
---|
9803 | | - goto free_sas_port; |
---|
| 9804 | + goto free_sas_rphy; |
---|
9804 | 9805 | |
---|
9805 | 9806 | return 0; |
---|
9806 | 9807 | |
---|
| 9808 | +free_sas_rphy: |
---|
| 9809 | + sas_rphy_free(rphy); |
---|
9807 | 9810 | free_sas_port: |
---|
9808 | 9811 | hpsa_free_sas_port(hpsa_sas_port); |
---|
9809 | 9812 | device->sas_port = NULL; |
---|