diff options
author | Sudip Mukherjee | 2016-02-27 13:03:34 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2016-03-12 07:09:09 +0100 |
commit | b3ca2e08e7dbec872458742b5a7d3b2b15826649 (patch) | |
tree | efda3b21f80e60add8b7830c3370f64633c9242e /drivers/staging/dgnc | |
parent | staging: dgnc: remove pci_unregister_driver (diff) | |
download | kernel-qcow2-linux-b3ca2e08e7dbec872458742b5a7d3b2b15826649.tar.gz kernel-qcow2-linux-b3ca2e08e7dbec872458742b5a7d3b2b15826649.tar.xz kernel-qcow2-linux-b3ca2e08e7dbec872458742b5a7d3b2b15826649.zip |
staging: dgnc: unregister pci driver
We may choose to load the module without the hardware present. That will
register the pci driver but since probe will not succeed so
dgnc_NumBoards will be 0. Now if we unload the module then the pci
driver stays registered as dgnc_NumBoards is 0. And if we try to load
the module again it fails with the error:
"Driver 'dgnc' is already registered."
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgnc')
-rw-r--r-- | drivers/staging/dgnc/dgnc_driver.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index 1d1d5c8c66ef..22a92d15ee9d 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -156,8 +156,7 @@ static void dgnc_cleanup_module(void) dgnc_tty_post_uninit(); - if (dgnc_NumBoards) - pci_unregister_driver(&dgnc_driver); + pci_unregister_driver(&dgnc_driver); } /* |