diff --git a/[refs] b/[refs] index cbd92162cec5..9ad8acd940c0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2b7cbe20174695bca1afe2a8f755e1eb299f4768 +refs/heads/master: a506b44bb5000b2652490a906c3e58beb2a8f6bb diff --git a/trunk/drivers/scsi/scsi.c b/trunk/drivers/scsi/scsi.c index c35f5fc0d668..c51b5769eac8 100644 --- a/trunk/drivers/scsi/scsi.c +++ b/trunk/drivers/scsi/scsi.c @@ -875,10 +875,12 @@ void scsi_device_put(struct scsi_device *sdev) { struct module *module = sdev->host->hostt->module; +#ifdef CONFIG_MODULE_UNLOAD /* The module refcount will be zero if scsi_device_get() * was called from a module removal routine */ if (module && module_refcount(module) != 0) module_put(module); +#endif put_device(&sdev->sdev_gendev); } EXPORT_SYMBOL(scsi_device_put);