[PATCH] Remove stale put_device() from scsi_sysfs_add_sdev()

From: Hannes Reinecke
Date: Sat Mar 08 2008 - 12:01:40 EST


In one obscure error path someone decided to do a put_device()
on the sdev parent.
This doesn't make much sense as we didn't take the reference
previously. So remove it.

Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
---
drivers/scsi/scsi_sysfs.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 8f674ac..7dc3015 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -829,7 +829,6 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev)

error = device_add(&sdev->sdev_gendev);
if (error) {
- put_device(sdev->sdev_gendev.parent);
sdev_printk(KERN_INFO, sdev,
"failed to add device: %d\n", error);
return error;
--
1.5.3.2


--------------050407030103030004010009
Content-Type: text/x-patch;
name="0005-Implement-SDEV_NEW-state.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="0005-Implement-SDEV_NEW-state.patch"