Commit 162e112e authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds

[PATCH] janitor: sg_register error handling

From: Daniele Bellucci <bellucda@tiscali.it>

handle register error, call unregister;

 linux-260-test5-kj-rddunlap/drivers/scsi/sg.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)
parent 2565f17b
...@@ -1514,8 +1514,10 @@ init_sg(void) ...@@ -1514,8 +1514,10 @@ init_sg(void)
if (rc) if (rc)
return rc; return rc;
rc = scsi_register_interface(&sg_interface); rc = scsi_register_interface(&sg_interface);
if (rc) if (rc) {
unregister_chrdev(SCSI_GENERIC_MAJOR, "sg");
return rc; return rc;
}
#ifdef CONFIG_SCSI_PROC_FS #ifdef CONFIG_SCSI_PROC_FS
sg_proc_init(); sg_proc_init();
#endif /* CONFIG_SCSI_PROC_FS */ #endif /* CONFIG_SCSI_PROC_FS */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment