Skip to contentSkip to conversation

Remove stale put_device() from scsi_sysfs_add_sdev()

PATCH In review Hannes Reinecke 1 participant 1 message May 23, 2007 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 3/9 Remove stale put_device() from scsi_sysfs_add_sdev()

In one obscure error path someone decided to do a put_device() on the sdev parent.
As this is the only reference to it I don't thing it makes much sense. Remove it.

---
 drivers/scsi/scsi_sysfs.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/scsi/scsi_sysfs.c +0 -1
index 2df7108..c81c326 100644
@@ -739,7 +739,6 @@ int scsi_sysfs_add_sdev(struct scsi_devi
 
 	error = device_add(&sdev->sdev_gendev);
 	if (error) {
-		put_device(sdev->sdev_gendev.parent);
 		sdev_printk(KERN_INFO, sdev,
 			    "failed to add device (error %d)\n", error);
 		return error;
Signature · 1 line
1.4.3.4