diff options
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index b7b9fec67a98..a89c421dab51 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -2021,6 +2021,7 @@ static void sd_probe_async(void *data, async_cookie_t cookie) | |||
2021 | 2021 | ||
2022 | sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n", | 2022 | sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n", |
2023 | sdp->removable ? "removable " : ""); | 2023 | sdp->removable ? "removable " : ""); |
2024 | put_device(&sdkp->dev); | ||
2024 | } | 2025 | } |
2025 | 2026 | ||
2026 | /** | 2027 | /** |
@@ -2106,6 +2107,7 @@ static int sd_probe(struct device *dev) | |||
2106 | 2107 | ||
2107 | get_device(&sdp->sdev_gendev); | 2108 | get_device(&sdp->sdev_gendev); |
2108 | 2109 | ||
2110 | get_device(&sdkp->dev); /* prevent release before async_schedule */ | ||
2109 | async_schedule(sd_probe_async, sdkp); | 2111 | async_schedule(sd_probe_async, sdkp); |
2110 | 2112 | ||
2111 | return 0; | 2113 | return 0; |