aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_sysfs.c')
-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)
993 */ 993 */
994void scsi_remove_target(struct device *dev) 994void scsi_remove_target(struct device *dev)
995{ 995{
996 struct device *rdev;
997
998 if (scsi_is_target_device(dev)) { 996 if (scsi_is_target_device(dev)) {
999 __scsi_remove_target(to_scsi_target(dev)); 997 __scsi_remove_target(to_scsi_target(dev));
1000 return; 998 return;
1001 } 999 }
1002 1000
1003 rdev = get_device(dev); 1001 get_device(dev);
1004 device_for_each_child(dev, NULL, __remove_child); 1002 device_for_each_child(dev, NULL, __remove_child);
1005 put_device(rdev); 1003 put_device(dev);
1006} 1004}
1007EXPORT_SYMBOL(scsi_remove_target); 1005EXPORT_SYMBOL(scsi_remove_target);
1008 1006