Commit 01aae971 authored by Matti Linnanvuori's avatar Matti Linnanvuori Committed by Linus Torvalds

telephony: phonedev panics if unregistering device not registered [Bug 9266]

Remove panic from phonedev.  See

	http://bugzilla.kernel.org/show_bug.cgi?id=9266

for details (phonedev panics if unregistering device not registered).
Signed-off-by: default avatarMatti Linnanvuori <mattilinnanvuori@yahoo.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent def6ae26
......@@ -120,8 +120,7 @@ int phone_register_device(struct phone_device *p, int unit)
void phone_unregister_device(struct phone_device *pfd)
{
mutex_lock(&phone_lock);
if (phone_device[pfd->minor] != pfd)
panic("phone: bad unregister");
if (likely(phone_device[pfd->minor] == pfd))
phone_device[pfd->minor] = NULL;
mutex_unlock(&phone_lock);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment