]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/scsi/hisi_sas/hisi_sas_main.c
scsi: hisi_sas: replace kfree with scsi_host_put
[mirror_ubuntu-bionic-kernel.git] / drivers / scsi / hisi_sas / hisi_sas_main.c
index 4112afd357bd94773155037dc169e1ebcafd4ebe..9427835b5021afd29b292db454f3d3329a3b03f8 100644 (file)
@@ -1900,7 +1900,7 @@ static struct Scsi_Host *hisi_sas_shost_alloc(struct platform_device *pdev,
 
        return shost;
 err_out:
-       kfree(shost);
+       scsi_host_put(shost);
        dev_err(dev, "shost alloc failed\n");
        return NULL;
 }
@@ -1991,7 +1991,7 @@ err_out_register_ha:
        scsi_remove_host(shost);
 err_out_ha:
        hisi_sas_free(hisi_hba);
-       kfree(shost);
+       scsi_host_put(shost);
        return rc;
 }
 EXPORT_SYMBOL_GPL(hisi_sas_probe);
@@ -2006,7 +2006,7 @@ int hisi_sas_remove(struct platform_device *pdev)
        sas_remove_host(sha->core.shost);
 
        hisi_sas_free(hisi_hba);
-       kfree(shost);
+       scsi_host_put(shost);
        return 0;
 }
 EXPORT_SYMBOL_GPL(hisi_sas_remove);