Skip to content

Commit b5a4867

Browse files
Cheah Kok Cheonggregkh
authored andcommitted
Staging: comedi: comedi_fops: Avoid orphaned proc entry
commit bf279ec upstream. Move comedi_proc_init to the end to avoid orphaned proc entry if module loading failed. Signed-off-by: Cheah Kok Cheong <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0c335d5 commit b5a4867

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/staging/comedi/comedi_fops.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2901,9 +2901,6 @@ static int __init comedi_init(void)
29012901

29022902
comedi_class->dev_groups = comedi_dev_groups;
29032903

2904-
/* XXX requires /proc interface */
2905-
comedi_proc_init();
2906-
29072904
/* create devices files for legacy/manual use */
29082905
for (i = 0; i < comedi_num_legacy_minors; i++) {
29092906
struct comedi_device *dev;
@@ -2921,6 +2918,9 @@ static int __init comedi_init(void)
29212918
mutex_unlock(&dev->mutex);
29222919
}
29232920

2921+
/* XXX requires /proc interface */
2922+
comedi_proc_init();
2923+
29242924
return 0;
29252925
}
29262926
module_init(comedi_init);

0 commit comments

Comments
 (0)