fix duplicate removal on error path in scsi_sysfs_add_sdev
commit8b75b31813ea2929108ab0bf963feb9459f16992
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 12 Feb 2010 17:13:55 +0000 (12 12:13 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 23 Jun 2011 22:24:05 +0000 (23 15:24 -0700)
tree2d04a52a11eb959cbc021f667a199d8435ce9256
parent6e3a40450613ba9d77c4f0bad6c27bdbd8891187
fix duplicate removal on error path in scsi_sysfs_add_sdev

commit ee37e09d81a4acf328f68189af12f116401f8c0f upstream.

This patch (as1335) fixes a bug in scsi_sysfs_add_sdev().  Its callers
always remove the device if anything goes wrong, so it should never
remove the device.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/scsi_sysfs.c