Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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);
}