>From f1717cf66290b81f9b376ddeba65426c91fb7fe4 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Sat, 8 Mar 2008 18:01:40 +0100 Subject: [PATCH] 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. This doesn't make much sense as we didn't take the reference previously. So remove it. Signed-off-by: Hannes Reinecke --- 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