summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorCheah Kok Cheong <thrust73@gmail.com>2016-12-30 19:25:52 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-06 19:19:40 -0700
commitb5a48676e7a2ee4ea0e2e02ce60ab2d0151916e0 (patch)
treecce88872cfa4e8d38577f8f3f12b8add69996fd3 /drivers
parent0c335d55cee6c632008a1b0cf34c2d12d3ee14e7 (diff)
Staging: comedi: comedi_fops: Avoid orphaned proc entry
commit bf279ece37d2a3eaaa9813fcd7a1d8a81eb29c20 upstream. Move comedi_proc_init to the end to avoid orphaned proc entry if module loading failed. Signed-off-by: Cheah Kok Cheong <thrust73@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/comedi/comedi_fops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 8fed55342b0f..b831f08e2769 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2901,9 +2901,6 @@ static int __init comedi_init(void)
comedi_class->dev_groups = comedi_dev_groups;
- /* XXX requires /proc interface */
- comedi_proc_init();
-
/* create devices files for legacy/manual use */
for (i = 0; i < comedi_num_legacy_minors; i++) {
struct comedi_device *dev;
@@ -2921,6 +2918,9 @@ static int __init comedi_init(void)
mutex_unlock(&dev->mutex);
}
+ /* XXX requires /proc interface */
+ comedi_proc_init();
+
return 0;
}
module_init(comedi_init);