aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2005-06-27 19:29:00 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-27 21:03:22 -0400
commit1a8ceafce5f1e68c28c7ba52fd7e72ab0008eb46 (patch)
tree35cda6b26cdd92f2f4ed66cc43fc0d82a1ebeb2c /drivers/pcmcia
parenta9a55243d4a5f41b0035d36457b87463aa232807 (diff)
[PATCH] pcmcia: properly handle all errors of register_chrdev
register_chrdev() can return errors (negative) other then -EBUSY, so check for any negative error code. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/pcmcia_ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c
index 3084d8a3ba41..b883bc151ed0 100644
--- a/drivers/pcmcia/pcmcia_ioctl.c
+++ b/drivers/pcmcia/pcmcia_ioctl.c
@@ -760,9 +760,9 @@ void __init pcmcia_setup_ioctl(void) {
760 760
761 /* Set up character device for user mode clients */ 761 /* Set up character device for user mode clients */
762 i = register_chrdev(0, "pcmcia", &ds_fops); 762 i = register_chrdev(0, "pcmcia", &ds_fops);
763 if (i == -EBUSY) 763 if (i < 0)
764 printk(KERN_NOTICE "unable to find a free device # for " 764 printk(KERN_NOTICE "unable to find a free device # for "
765 "Driver Services\n"); 765 "Driver Services (error=%d)\n", i);
766 else 766 else
767 major_dev = i; 767 major_dev = i;
768 768