aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-05-22 11:04:53 +0000
committerDavid S. Miller <davem@davemloft.net>2009-05-25 00:55:31 -0700
commitddacd14e8db9b9c4434d00545f6483fe01f02991 (patch)
treec3a5c14e4fbb69e2ed5a2e651ab2e7efca78a787
parentdb9bb63a1b5b65df41d112a8c21adbbfc6a4ac08 (diff)
mISDN: get_free_devid() failure ignored
dev->id is unsigned so a get_free_devid() error is ignored. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Karsten Keil <keil@b1-systems.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/isdn/mISDN/core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/isdn/mISDN/core.c b/drivers/isdn/mISDN/core.c
index 9426c9827e4..21d34be5af6 100644
--- a/drivers/isdn/mISDN/core.c
+++ b/drivers/isdn/mISDN/core.c
@@ -214,7 +214,7 @@ get_free_devid(void)
if (!test_and_set_bit(i, (u_long *)&device_ids))
break;
if (i > MAX_DEVICE_ID)
- return -1;
+ return -EBUSY;
return i;
}
@@ -224,10 +224,10 @@ mISDN_register_device(struct mISDNdevice *dev,
{
int err;
- dev->id = get_free_devid();
- err = -EBUSY;
- if (dev->id < 0)
+ err = get_free_devid();
+ if (err < 0)
goto error1;
+ dev->id = err;
device_initialize(&dev->dev);
if (name && name[0])