From: Karsten Keil <keil@b1-systems.de>
To: linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
i4ldeveloper@listserv.isdn4linux.de
Subject: [mISDN PATCH v2 13/19] isdn: get_free_devid() failure ignored
Date: Fri, 22 May 2009 23:04:53 +0200 [thread overview]
Message-ID: <ca07ceb5f4c3cede952943686120b27e20008074.1243024967.git.kkeil@pingi.linux-pingi.de> (raw)
In-Reply-To: <cover.1243024967.git.kkeil@pingi.linux-pingi.de>
From: Roel Kluin <roel.kluin@gmail.com>
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>
---
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
next prev parent reply other threads:[~2009-05-22 21:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-22 20:42 [mISDN PATCH v2 00/19] mISDN patchset for next Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 01/19] Add watchdog functionality to hfcmulti driver Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 02/19] DSP now uses ring buffer for echo canceler Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 03/19] Echo canceler now gets delay information from hardware Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 04/19] Fixed missing spin lock on pipeline process Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 05/19] Reduce stack size in dsp_cmx_send() Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 07/19] Fix DTMF locking bug issue Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 06/19] Added layer-1-hold feature Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 08/19] Hardware acceleration is now possible in conjunction with audio recording Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 09/19] Fix TEI and SAPI handling Karsten Keil
2009-05-22 21:53 ` Sam Ravnborg
2009-05-23 13:00 ` Karsten Keil
2009-05-23 23:10 ` Sam Ravnborg
2009-05-24 15:39 ` Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 11/19] Add allocation of recvbuf[1500] at run time to reduce stack size Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 10/19] Add "sapi" information to debug messages Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 12/19] Fix skb leak in error cases Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 14/19] Add XHFC support for embedded Speech-Design board to hfcmulti Karsten Keil
2009-05-22 21:04 ` Karsten Keil [this message]
2009-05-22 21:04 ` [mISDN PATCH v2 15/19] Add PCI ID for Junghanns 8S card Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 16/19] Added PCI ID for new Junghanns.net Single E1 cards Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 17/19] Cleanup debug messages Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 18/19] Use kernel_{send,recv}msg instead of open coding Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 19/19] Fix DTMF detection enable/disable Karsten Keil
2009-05-25 7:53 ` [mISDN PATCH v2 00/19] mISDN patchset for next David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ca07ceb5f4c3cede952943686120b27e20008074.1243024967.git.kkeil@pingi.linux-pingi.de \
--to=keil@b1-systems.de \
--cc=davem@davemloft.net \
--cc=i4ldeveloper@listserv.isdn4linux.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®