/* scsi_proc.c */
 #ifdef CONFIG_SCSI_PROC_FS
-extern void scsi_proc_hostdir_add(struct scsi_host_template *);
+extern int scsi_proc_hostdir_add(struct scsi_host_template *);
 extern void scsi_proc_hostdir_rm(struct scsi_host_template *);
 extern void scsi_proc_host_add(struct Scsi_Host *);
 extern void scsi_proc_host_rm(struct Scsi_Host *);
 extern int scsi_init_procfs(void);
 extern void scsi_exit_procfs(void);
 #else
-# define scsi_proc_hostdir_add(sht)    do { } while (0)
+# define scsi_proc_hostdir_add(sht)    0
 # define scsi_proc_hostdir_rm(sht)     do { } while (0)
 # define scsi_proc_host_add(shost)     do { } while (0)
 # define scsi_proc_host_rm(shost)      do { } while (0)
 
  *
  * Sets sht->proc_dir to the new directory.
  */
-
-void scsi_proc_hostdir_add(struct scsi_host_template *sht)
+int scsi_proc_hostdir_add(struct scsi_host_template *sht)
 {
+       int ret = 0;
+
        if (!sht->show_info)
-               return;
+               return 0;
 
        mutex_lock(&global_host_template_mutex);
        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",
                               __func__, sht->proc_name);
+                       ret = -ENOMEM;
+               }
        }
        mutex_unlock(&global_host_template_mutex);
+
+       return ret;
 }
 
 /**