diff options
Diffstat (limited to 'drivers/scsi/hosts.c')
-rw-r--r-- | drivers/scsi/hosts.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index ed7e0a1fc34d..079c733bfe24 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c @@ -455,9 +455,10 @@ struct Scsi_Host *scsi_host_lookup(unsigned short hostnum) struct Scsi_Host *shost = ERR_PTR(-ENXIO); cdev = class_find_child(&shost_class, &hostnum, __scsi_host_match); - if (cdev) + if (cdev) { shost = scsi_host_get(class_to_shost(cdev)); - + class_device_put(cdev); + } return shost; } EXPORT_SYMBOL(scsi_host_lookup); |