提交 ac4e504a 编写于 作者: S Sudip Mukherjee 提交者: Greg Kroah-Hartman

staging: dgap: fix error path

The code in dgap_stop() is almost a duplicate of the code that will be
executed on pci_unregister_driver(). So the error code was stopping and
unregistering everything twice.
Signed-off-by: NSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 7d708e52
......@@ -7133,8 +7133,10 @@ static int dgap_init_module(void)
return rc;
rc = pci_register_driver(&dgap_driver);
if (rc)
goto err_stop;
if (rc) {
dgap_stop();
return rc;
}
rc = dgap_create_driver_sysfiles(&dgap_driver);
if (rc)
......@@ -7146,9 +7148,6 @@ static int dgap_init_module(void)
err_unregister:
pci_unregister_driver(&dgap_driver);
err_stop:
dgap_stop();
return rc;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册