# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1521 -> 1.1522 # drivers/scsi/scsi_sysfs.c 1.38 -> 1.39 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 04/01/16 mort@green.i.bork.org 1.1522 # Stop adding sysfs attributes after we call scsi_remove_device() # when we encounter an error. # -------------------------------------------- # diff -Nru a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c --- a/drivers/scsi/scsi_sysfs.c Fri Jan 16 13:45:02 2004 +++ b/drivers/scsi/scsi_sysfs.c Fri Jan 16 13:45:02 2004 @@ -370,8 +370,10 @@ for (i = 0; sdev->host->hostt->sdev_attrs[i]; i++) { error = attr_add(&sdev->sdev_gendev, sdev->host->hostt->sdev_attrs[i]); - if (error) + if (error) { scsi_remove_device(sdev); + goto out; + } } } @@ -380,11 +382,14 @@ scsi_sysfs_sdev_attrs[i])) { error = device_create_file(&sdev->sdev_gendev, scsi_sysfs_sdev_attrs[i]); - if (error) + if (error) { scsi_remove_device(sdev); + goto out; + } } } + out: return error; clean_device: