diff options
author | Cheah Kok Cheong <thrust73@gmail.com> | 2016-12-30 11:25:52 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-07 01:59:41 (GMT) |
commit | 9bf0d78bf640c95a3e9e7e1eeb9e0596a651bbe7 (patch) | |
tree | 28f0901f5aaa62b4a5cf2f6ba339bb637b8bdb74 /drivers/staging | |
parent | 0f31691508c64a139da303f17b31ed3dcbf63de1 (diff) | |
download | linux-9bf0d78bf640c95a3e9e7e1eeb9e0596a651bbe7.tar.xz |
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/staging')
-rw-r--r-- | drivers/staging/comedi/comedi_fops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index a34fd5a..ec99790 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -2898,9 +2898,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; @@ -2918,6 +2915,9 @@ static int __init comedi_init(void) mutex_unlock(&dev->mutex); } + /* XXX requires /proc interface */ + comedi_proc_init(); + return 0; } module_init(comedi_init); |