mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 11:13:58 +08:00
staging: comedi: das08_cs: change driver registration order
As done with the other comedi driver types, register the comedi_driver first then the pcmcia_driver. Also, make sure the pcmcia_driver registration succeeds and unregister the comedi_driver if it fails. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
468777024e
commit
36061c842b
@ -239,11 +239,18 @@ static int __init das08_cs_init_module(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = pcmcia_register_driver(&das08_cs_driver);
|
||||
ret = comedi_driver_register(&driver_das08_cs);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return comedi_driver_register(&driver_das08_cs);
|
||||
ret = pcmcia_register_driver(&das08_cs_driver);
|
||||
if (ret < 0) {
|
||||
comedi_driver_unregister(&driver_das08_cs);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
module_init(das08_cs_init_module);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user