dect
/
linux-2.6
Archived
13
0
Fork 0

[PATCH] pcmcia/ds: handle any error code

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: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Randy Dunlap 2005-05-16 21:53:56 -07:00 committed by Linus Torvalds
parent 24d568ed1b
commit afbf510d47
1 changed files with 2 additions and 2 deletions

View File

@ -1592,9 +1592,9 @@ static int __init init_pcmcia_bus(void)
/* Set up character device for user mode clients */
i = register_chrdev(0, "pcmcia", &ds_fops);
if (i == -EBUSY)
if (i < 0)
printk(KERN_NOTICE "unable to find a free device # for "
"Driver Services\n");
"Driver Services (error=%d)\n", i);
else
major_dev = i;