From 9bbe34e9688963ea101ba142e31067327ad945d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Fri, 6 Feb 2009 23:47:14 -0800 Subject: [PATCH] --- yaml --- r: 134315 b: refs/heads/master c: 910d30b704542b49f83881a4832d8414c6c3d9c3 h: refs/heads/master i: 134313: 1a67dfc07aa2a3834b58be38ae11fc7def437629 134311: c9e43aa67848efb49f02bbb69bff8585e49d6a50 v: v3 --- [refs] | 2 +- trunk/net/ax25/ax25_iface.c | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index bfd53125c738..aacbf2d69c00 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 69ebbf58f3dff9fb4e5240e472b5869fa869dae1 +refs/heads/master: 910d30b704542b49f83881a4832d8414c6c3d9c3 diff --git a/trunk/net/ax25/ax25_iface.c b/trunk/net/ax25/ax25_iface.c index 8443af57a374..71338f112108 100644 --- a/trunk/net/ax25/ax25_iface.c +++ b/trunk/net/ax25/ax25_iface.c @@ -61,27 +61,24 @@ void ax25_protocol_release(unsigned int pid) write_lock_bh(&protocol_list_lock); protocol = protocol_list; - if (protocol == NULL) { - write_unlock_bh(&protocol_list_lock); - return; - } + if (protocol == NULL) + goto out; if (protocol->pid == pid) { protocol_list = protocol->next; - write_unlock_bh(&protocol_list_lock); - return; + goto out; } while (protocol != NULL && protocol->next != NULL) { if (protocol->next->pid == pid) { s = protocol->next; protocol->next = protocol->next->next; - write_unlock_bh(&protocol_list_lock); - return; + goto out; } protocol = protocol->next; } +out: write_unlock_bh(&protocol_list_lock); }