Skip to contentSkip to conversation

synclink_gt: fix init error handling

PATCH New Akinobu Mita 1 participant 1 message Nov 27, 2006 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 synclink_gt: fix init error handling

Initialization synclink_gt forgot to unregister pci driver on error path.

---
 drivers/char/synclink_gt.c |    1 +
 1 file changed, 1 insertion(+)
drivers/char/synclink_gt.c +1 -0
Index: work-fault-inject/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;
 	}