Skip to content

Commit

Permalink
[SCSI] eliminate an unnecessary local variable from scsi_remove_target()
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Alan Stern authored and James Bottomley committed Jan 3, 2011
1 parent bfcf72e commit 4151170
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/scsi/scsi_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 4151170

Please sign in to comment.