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

Commit 910d30b7 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by David S. Miller
Browse files

ax25: more common return path joining

parent 69ebbf58
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -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);
}