Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Matti Linnanvuori <mattilinnanvuori@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Matti Linnanvuori and committed by
Linus Torvalds
01aae971 def6ae26

+2 -3
+2 -3
drivers/telephony/phonedev.c
··· 120 120 void phone_unregister_device(struct phone_device *pfd) 121 121 { 122 122 mutex_lock(&phone_lock); 123 - if (phone_device[pfd->minor] != pfd) 124 - panic("phone: bad unregister"); 125 - phone_device[pfd->minor] = NULL; 123 + if (likely(phone_device[pfd->minor] == pfd)) 124 + phone_device[pfd->minor] = NULL; 126 125 mutex_unlock(&phone_lock); 127 126 } 128 127