kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: dgnc: Remove useless and deadly judgment
@ 2016-02-29  6:41 Navy Cheng
  2016-02-29  7:58 ` Valdis.Kletnieks at vt.edu
  2016-03-11 21:29 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 4+ messages in thread
From: Navy Cheng @ 2016-02-29  6:41 UTC (permalink / raw)
  To: kernelnewbies

pci_unregister_driver() should be used once dgnc module exit. It has
nothing to do with dgnc_NumBoards. Remove the judgment of dgnc_NumBoards to
avoid pci_unregister_driver() is not used when dgnc_NumBoards is 0.

Signed-off-by: Navy Cheng <navych@126.com>
---
 drivers/staging/dgnc/dgnc_driver.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c
index fc6d298..20b0c3b 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);
 }
 
 /*
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-03-11 21:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-29  6:41 [PATCH] staging: dgnc: Remove useless and deadly judgment Navy Cheng
2016-02-29  7:58 ` Valdis.Kletnieks at vt.edu
2016-02-29 12:27   ` Navy Cheng
2016-03-11 21:29 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).