]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: put module _after_ detach
authorIan Abbott <abbotti@mev.co.uk>
Thu, 4 Apr 2013 13:58:57 +0000 (14:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 21:33:18 +0000 (14:33 -0700)
commit5de437a1c90646d3565acdaf58924b8fd82efe28
tree04a6965c7bed192adef204499e4661990b4bc770
parent2e33245c824565a83162af02fe696e1b9b9aed13
staging: comedi: put module _after_ detach

On failure of the call to the low-level comedi device driver's
`->attach()` handler from `__comedi_device_attach()`, reverse the
current ordering of the calls to `module_put()` and
`comedi_device_detach()` because `__comedi_device_detach()` will call
code in the module being put.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers.c