summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2010-11-15 22:04:56 +0100
committerJames Bottomley <James.Bottomley@suse.de>2011-01-03 17:30:27 +0100
commit41511704b678f7b101a76e58d6c6b7bbe2a9ad70 (patch)
tree1c83485b49bfbd52f6a6111a3ae0eec46e7d45b3 /drivers/scsi
parent[SCSI] libiscsi: use bh locking instead of irq with session lock (diff)
downloadlinux-41511704b678f7b101a76e58d6c6b7bbe2a9ad70.tar.xz
linux-41511704b678f7b101a76e58d6c6b7bbe2a9ad70.zip
[SCSI] eliminate an unnecessary local variable from scsi_remove_target()
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/scsi_sysfs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 76ee2e784f75..4c68d36f9ac2 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -993,16 +993,14 @@ static int __remove_child (struct device * dev, void * data)
*/
void scsi_remove_target(struct device *dev)
{
- struct device *rdev;
-
if (scsi_is_target_device(dev)) {
__scsi_remove_target(to_scsi_target(dev));
return;
}
- rdev = get_device(dev);
+ get_device(dev);
device_for_each_child(dev, NULL, __remove_child);
- put_device(rdev);
+ put_device(dev);
}
EXPORT_SYMBOL(scsi_remove_target);