diff options
Diffstat (limited to 'drivers/scsi/scsi_scan.c')
-rw-r--r-- | drivers/scsi/scsi_scan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 89da43f73c00..29c4c0480976 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -1815,6 +1815,7 @@ static void scsi_finish_async_scan(struct async_scan_data *data) | |||
1815 | } | 1815 | } |
1816 | spin_unlock(&async_scan_lock); | 1816 | spin_unlock(&async_scan_lock); |
1817 | 1817 | ||
1818 | scsi_autopm_put_host(shost); | ||
1818 | scsi_host_put(shost); | 1819 | scsi_host_put(shost); |
1819 | kfree(data); | 1820 | kfree(data); |
1820 | } | 1821 | } |
@@ -1841,7 +1842,6 @@ static int do_scan_async(void *_data) | |||
1841 | 1842 | ||
1842 | do_scsi_scan_host(shost); | 1843 | do_scsi_scan_host(shost); |
1843 | scsi_finish_async_scan(data); | 1844 | scsi_finish_async_scan(data); |
1844 | scsi_autopm_put_host(shost); | ||
1845 | return 0; | 1845 | return 0; |
1846 | } | 1846 | } |
1847 | 1847 | ||
@@ -1869,7 +1869,7 @@ void scsi_scan_host(struct Scsi_Host *shost) | |||
1869 | p = kthread_run(do_scan_async, data, "scsi_scan_%d", shost->host_no); | 1869 | p = kthread_run(do_scan_async, data, "scsi_scan_%d", shost->host_no); |
1870 | if (IS_ERR(p)) | 1870 | if (IS_ERR(p)) |
1871 | do_scan_async(data); | 1871 | do_scan_async(data); |
1872 | /* scsi_autopm_put_host(shost) is called in do_scan_async() */ | 1872 | /* scsi_autopm_put_host(shost) is called in scsi_finish_async_scan() */ |
1873 | } | 1873 | } |
1874 | EXPORT_SYMBOL(scsi_scan_host); | 1874 | EXPORT_SYMBOL(scsi_scan_host); |
1875 | 1875 | ||