From: Cheah Kok Cheong <thrust73@xxxxxxxxx> 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@xxxxxxxxx> Reviewed-by: Ian Abbott <abbotti@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/comedi/comedi_fops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 7e421908eb3a..1a1b3dd2c67a 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -2073,9 +2073,6 @@ static int __init comedi_init(void) return PTR_ERR(comedi_class); } - /* XXX requires /proc interface */ - comedi_proc_init(); - /* create devices files for legacy/manual use */ for (i = 0; i < comedi_num_legacy_minors; i++) { int minor; @@ -2089,6 +2086,9 @@ static int __init comedi_init(void) } } + /* XXX requires /proc interface */ + comedi_proc_init(); + return 0; } -- 2.13.2