[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <a9196e249a7d3815c000bda0ea6106f20a4e987c.1242739648.git.kkeil@pingi.linux-pingi.de>
Date: Tue, 19 May 2009 15:58:38 +0200
From: Karsten Keil <keil@...systems.de>
To: linux-kernel@...r.kernel.org
Cc: Stephen Rothwell <sfr@...b.auug.org.au>,
i4ldeveloper@...tserv.isdn4linux.de
Subject: [PATCH 19/19] isdn: get_free_devid() failure ignored
From: Roel Kluin <roel.kluin@...il.com>
dev->id is unsigned so a get_free_devid() error is ignored.
Signed-off-by: Roel Kluin <roel.kluin@...il.com>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Karsten Keil <keil@...systems.de>
---
drivers/isdn/mISDN/core.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/isdn/mISDN/core.c b/drivers/isdn/mISDN/core.c
index 9426c98..21d34be 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])
--
1.6.0.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists