summaryrefslogtreecommitdiffstats
path: root/net/ax25/ax25_iface.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2009-02-07 08:47:14 +0100
committerDavid S. Miller <davem@davemloft.net>2009-02-07 08:47:14 +0100
commit910d30b704542b49f83881a4832d8414c6c3d9c3 (patch)
tree3973f0a9b850dc82158c9bf3c310c34ba2dacda7 /net/ax25/ax25_iface.c
parentipmr: use goto to common label instead of opencoding (diff)
downloadlinux-910d30b704542b49f83881a4832d8414c6c3d9c3.tar.xz
linux-910d30b704542b49f83881a4832d8414c6c3d9c3.zip
ax25: more common return path joining
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/ax25/ax25_iface.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/net/ax25/ax25_iface.c b/net/ax25/ax25_iface.c
index 8443af57a374..71338f112108 100644
--- a/net/ax25/ax25_iface.c
+++ b/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);
}