diff mbox

[2/4] ax25: more common return path joining

Message ID 1233966063-2419-2-git-send-email-ilpo.jarvinen@helsinki.fi
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Ilpo Järvinen Feb. 7, 2009, 12:21 a.m. UTC
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Cc: Ralf Baechle <ralf@linux-mips.org>
---
 net/ax25/ax25_iface.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

Comments

Ralf Baechle Feb. 7, 2009, 12:28 a.m. UTC | #1
On Sat, Feb 07, 2009 at 02:21:01AM +0200, Ilpo Järvinen wrote:

> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
> Cc: Ralf Baechle <ralf@linux-mips.org>

Looks good, thus

Acked-by: Ralf Baechle <ralf@linux-mips.org>

  Ralf
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Feb. 7, 2009, 7:49 a.m. UTC | #2
From: Ralf Baechle <ralf@linux-mips.org>
Date: Sat, 7 Feb 2009 00:28:33 +0000

> On Sat, Feb 07, 2009 at 02:21:01AM +0200, Ilpo Järvinen wrote:
> 
> > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
> > Cc: Ralf Baechle <ralf@linux-mips.org>
> 
> Looks good, thus
> 
> Acked-by: Ralf Baechle <ralf@linux-mips.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/ax25/ax25_iface.c b/net/ax25/ax25_iface.c
index 8443af5..71338f1 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);
 }