diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-05-22 07:04:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-25 03:55:31 -0400 |
commit | ddacd14e8db9b9c4434d00545f6483fe01f02991 (patch) | |
tree | c3a5c14e4fbb69e2ed5a2e651ab2e7efca78a787 /drivers/isdn/mISDN | |
parent | db9bb63a1b5b65df41d112a8c21adbbfc6a4ac08 (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>
Diffstat (limited to 'drivers/isdn/mISDN')
-rw-r--r-- | 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 9426c9827e47..21d34be5af6a 100644 --- a/drivers/isdn/mISDN/core.c +++ b/drivers/isdn/mISDN/core.c | |||
@@ -214,7 +214,7 @@ get_free_devid(void) | |||
214 | if (!test_and_set_bit(i, (u_long *)&device_ids)) | 214 | if (!test_and_set_bit(i, (u_long *)&device_ids)) |
215 | break; | 215 | break; |
216 | if (i > MAX_DEVICE_ID) | 216 | if (i > MAX_DEVICE_ID) |
217 | return -1; | 217 | return -EBUSY; |
218 | return i; | 218 | return i; |
219 | } | 219 | } |
220 | 220 | ||
@@ -224,10 +224,10 @@ mISDN_register_device(struct mISDNdevice *dev, | |||
224 | { | 224 | { |
225 | int err; | 225 | int err; |
226 | 226 | ||
227 | dev->id = get_free_devid(); | 227 | err = get_free_devid(); |
228 | err = -EBUSY; | 228 | if (err < 0) |
229 | if (dev->id < 0) | ||
230 | goto error1; | 229 | goto error1; |
230 | dev->id = err; | ||
231 | 231 | ||
232 | device_initialize(&dev->dev); | 232 | device_initialize(&dev->dev); |
233 | if (name && name[0]) | 233 | if (name && name[0]) |