提交 910d30b7 编写于 作者: I Ilpo Järvinen 提交者: David S. Miller

ax25: more common return path joining

Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Acked-by: NRalf Baechle <ralf@linux-mips.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 69ebbf58
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册