浏览代码

[PATCH] synclink_gt: fix init error handling

Initialization synclink_gt forgot to unregister pci driver on error path.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Akinobu Mita 18 年之前
父节点
当前提交
36499dc2bc
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/char/synclink_gt.c

+ 1 - 0
drivers/char/synclink_gt.c

@@ -3522,6 +3522,7 @@ static int __init slgt_init(void)
 
 	if (!slgt_device_list) {
 		printk("%s no devices found\n",driver_name);
+		pci_unregister_driver(&pci_driver);
 		return -ENODEV;
 	}