Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 354ff804 authored by Cheah Kok Cheong's avatar Cheah Kok Cheong Committed by Greg Kroah-Hartman
Browse files

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: default avatarCheah Kok Cheong <thrust73@gmail.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 339b04fb
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2590,9 +2590,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;
@@ -2610,6 +2607,9 @@ static int __init comedi_init(void)
		mutex_unlock(&dev->mutex);
	}

	/* XXX requires /proc interface */
	comedi_proc_init();

	return 0;
}
module_init(comedi_init);