aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn')
-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 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])