diff options
Diffstat (limited to 'drivers/scsi/scsi_scan.c')
| -rw-r--r-- | drivers/scsi/scsi_scan.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index c4478380140..0547a7f44d4 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
| @@ -317,6 +317,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget, | |||
| 317 | out_device_destroy: | 317 | out_device_destroy: |
| 318 | scsi_device_set_state(sdev, SDEV_DEL); | 318 | scsi_device_set_state(sdev, SDEV_DEL); |
| 319 | transport_destroy_device(&sdev->sdev_gendev); | 319 | transport_destroy_device(&sdev->sdev_gendev); |
| 320 | put_device(&sdev->sdev_dev); | ||
| 320 | put_device(&sdev->sdev_gendev); | 321 | put_device(&sdev->sdev_gendev); |
| 321 | out: | 322 | out: |
| 322 | if (display_failure_msg) | 323 | if (display_failure_msg) |
| @@ -957,6 +958,7 @@ static inline void scsi_destroy_sdev(struct scsi_device *sdev) | |||
| 957 | if (sdev->host->hostt->slave_destroy) | 958 | if (sdev->host->hostt->slave_destroy) |
| 958 | sdev->host->hostt->slave_destroy(sdev); | 959 | sdev->host->hostt->slave_destroy(sdev); |
| 959 | transport_destroy_device(&sdev->sdev_gendev); | 960 | transport_destroy_device(&sdev->sdev_gendev); |
| 961 | put_device(&sdev->sdev_dev); | ||
| 960 | put_device(&sdev->sdev_gendev); | 962 | put_device(&sdev->sdev_gendev); |
| 961 | } | 963 | } |
| 962 | 964 | ||
