* [PATCH] telephony: phonedev panics if unregistering device not registered [Bug 9266]
@ 2007-10-31 17:05 Matti Linnanvuori
0 siblings, 0 replies; only message in thread
From: Matti Linnanvuori @ 2007-10-31 17:05 UTC (permalink / raw)
To: linux-kernel; +Cc: bugme-daemon
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-31 17:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-31 17:05 [PATCH] telephony: phonedev panics if unregistering device not registered [Bug 9266] Matti Linnanvuori
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®