# 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.1491 -> 1.1492 # drivers/scsi/scsi_scan.c 1.114 -> 1.115 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 04/01/09 mort@green.i.bork.org 1.1492 # We should call slave_destroy on the error path if slave_alloc # has already been called and has succeeded in scsi_alloc_sdev() # -------------------------------------------- # diff -Nru a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c --- a/drivers/scsi/scsi_scan.c Fri Jan 9 10:20:43 2004 +++ b/drivers/scsi/scsi_scan.c Fri Jan 9 10:20:43 2004 @@ -254,7 +254,7 @@ "%d:%d:%d:%d", sdev->host->host_no, sdev->channel, sdev->id, sdev->lun); } else - goto out_free_queue; + goto out_cleanup_slave; /* * If there are any same target siblings, add this to the @@ -283,6 +283,9 @@ spin_unlock_irqrestore(shost->host_lock, flags); return sdev; +out_cleanup_slave: + if (shost->hostt->slave_destroy) + shost->hostt->slave_destroy(sdev); out_free_queue: scsi_free_queue(sdev->request_queue); out_free_dev: