]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: use centralized error clean-up in comedi_init()
authorIan Abbott <abbotti@mev.co.uk>
Fri, 16 Jun 2017 18:35:35 +0000 (19:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Jun 2017 16:37:07 +0000 (00:37 +0800)
commita284a4ea3e71a1942916148282a57a0e38c5f3ba
treef3f8409d2baa88be0773428354edf0b4ca3bf80d
parent7fa0c28dbccb3adcf901eb80e1436feb331aa17d
staging: comedi: use centralized error clean-up in comedi_init()

Centralize the "clean-up on error" handling in `comedi_init()` using
`goto` statements.  Also change some of the explicit `-EIO` return
values to the error return values from the failing functions as there is
no good reason to use `-EIO` explicitly.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedi_fops.c