On Mon, Feb 29, 2016 at 02:41:34PM +0800, Navy Cheng wrote:
> 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 <[email protected]>
> ---
>  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);
>  }
>  
>  /*

Someone else sent a patch that did much this same thing 2 days before
you did.

Also please use the get_maintainers.pl file to determine the correct
mailing list to send patches like this to (hint, it's not
kernelnewbies...)

thanks,

greg k-h

_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to