mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matti Linnanvuori <mattilinnanvuori@yahoo.com>
To: linux-kernel@vger.kernel.org
Cc: bugme-daemon@kernel-bugs.osdl.org
Subject: [PATCH] telephony: phonedev panics if unregistering device not registered [Bug 9266]
Date: Wed, 31 Oct 2007 10:05:46 -0700 (PDT)	[thread overview]
Message-ID: <224028.52554.qm@web52009.mail.re2.yahoo.com> (raw)

From: Matti Linnanvuori <mattilinnanvuori@yahoo.com>

Remove panic from phonedev.

Signed-off-by: Matti Linnanvuori <mattilinnanvuori@yahoo.com>
---

--- a/drivers/telephony/phonedev.c	2007-10-31 17:52:55.784817000 +0200
+++ linux-2.6.24/drivers/telephony/phonedev.c	2007-10-31 17:55:48.144879000 +0200
@@ -120,9 +120,8 @@ int phone_register_device(struct phone_d
 void phone_unregister_device(struct phone_device *pfd)
 {
 	mutex_lock(&phone_lock);
-	if (phone_device[pfd->minor] != pfd)
-		panic("phone: bad unregister");
-	phone_device[pfd->minor] = NULL;
+	if (likely(phone_device[pfd->minor] == pfd))
+		phone_device[pfd->minor] = NULL;
 	mutex_unlock(&phone_lock);
 }
 




      Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit dem neuen Yahoo! Mail. www.yahoo.de/mail

                 reply	other threads:[~2007-10-31 17:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=224028.52554.qm@web52009.mail.re2.yahoo.com \
    --to=mattilinnanvuori@yahoo.com \
    --cc=bugme-daemon@kernel-bugs.osdl.org \
    --cc=linux-kernel@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®