PATCH: (as84) Small fixup for SCSI proc code

Alan Stern
2003-09-16T14:50:59Z

Mike:

The updated SCSI proc directory code that I sent you a few months ago has
a small mistake -- the error path fails to release a semaphore. This
patch fixes it; please apply.

Alan Stern

===== scsi_proc.c 1.16 vs edited =====
--- 1.16/drivers/scsi/scsi_proc.c Thu Aug 14 18:37:32 2003
+++ edited/drivers/scsi/scsi_proc.c Fri Aug 15 15:40:28 2003
@@ -85,12 +85,11 @@
down(&global_host_template_sem);
if (!sht->present++) {
sht->proc_dir = proc_mkdir(sht->proc_name, proc_scsi);
- if (!sht->proc_dir) {
+ if (!sht->proc_dir)
printk(KERN_ERR "%s: proc_mkdir failed for %s\n",
__FUNCTION__, sht->proc_name);
- return;
- }
- sht->proc_dir->owner = sht->module;
+ else
+ sht->proc_dir->owner = sht->module;
}
up(&global_host_template_sem);
}