Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35041
b: refs/heads/master
c: f479ab8
h: refs/heads/master
i:
  35039: db61f26
v: v3
  • Loading branch information
James Bottomley authored and James Bottomley committed Sep 7, 2006
1 parent 2c0bb1f commit c9bff5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 884d25cc4fda20908fd4ef93dbb41d817984b68b
refs/heads/master: f479ab87936563a286b8aa0e39003c40fa31c6da
6 changes: 4 additions & 2 deletions trunk/drivers/scsi/scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -873,10 +873,12 @@ EXPORT_SYMBOL(scsi_device_get);
*/
void scsi_device_put(struct scsi_device *sdev)
{
struct module *module = sdev->host->hostt->module;

/* The module refcount will be zero if scsi_device_get()
* was called from a module removal routine */
if (likely(module_refcount(sdev->host->hostt->module) != 0))
module_put(sdev->host->hostt->module);
if (module && module_refcount(module) != 0)
module_put(module);
put_device(&sdev->sdev_gendev);
}
EXPORT_SYMBOL(scsi_device_put);
Expand Down

0 comments on commit c9bff5f

Please sign in to comment.