Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit afbf510d authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds
Browse files

[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: default avatarRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 24d568ed
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;