mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
Staging: comedi: comedi_fops: Avoid orphaned proc entry
commit bf279ece37 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0c335d55ce
commit
b5a48676e7
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user