diff options
Diffstat (limited to 'drivers/char/pcmcia/cm4040_cs.c')
-rw-r--r-- | drivers/char/pcmcia/cm4040_cs.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c index 29efa64580a8..47a8465bf95b 100644 --- a/drivers/char/pcmcia/cm4040_cs.c +++ b/drivers/char/pcmcia/cm4040_cs.c | |||
@@ -724,16 +724,19 @@ static int __init cm4040_init(void) | |||
724 | if (!cmx_class) | 724 | if (!cmx_class) |
725 | return -1; | 725 | return -1; |
726 | 726 | ||
727 | rc = pcmcia_register_driver(&reader_driver); | ||
728 | if (rc < 0) | ||
729 | return rc; | ||
730 | |||
731 | major = register_chrdev(0, DEVICE_NAME, &reader_fops); | 727 | major = register_chrdev(0, DEVICE_NAME, &reader_fops); |
732 | if (major < 0) { | 728 | if (major < 0) { |
733 | printk(KERN_WARNING MODULE_NAME | 729 | printk(KERN_WARNING MODULE_NAME |
734 | ": could not get major number\n"); | 730 | ": could not get major number\n"); |
735 | return -1; | 731 | return -1; |
736 | } | 732 | } |
733 | |||
734 | rc = pcmcia_register_driver(&reader_driver); | ||
735 | if (rc < 0) { | ||
736 | unregister_chrdev(major, DEVICE_NAME); | ||
737 | return rc; | ||
738 | } | ||
739 | |||
737 | return 0; | 740 | return 0; |
738 | } | 741 | } |
739 | 742 | ||