提交 f372d090 编写于 作者: M Markus Pargmann 提交者: Antonio Quartulli

batman-adv: Remove unnecessary ret variable in algo_register

Remove ret variable and all jumps.
Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
Signed-off-by: NMarek Lindner <mareklindner@neomailbox.ch>
上级 9fb6c651
......@@ -544,17 +544,14 @@ int batadv_algo_register(struct batadv_algo_ops *bat_algo_ops)
int batadv_algo_select(struct batadv_priv *bat_priv, char *name)
{
struct batadv_algo_ops *bat_algo_ops;
int ret = -EINVAL;
bat_algo_ops = batadv_algo_get(name);
if (!bat_algo_ops)
goto out;
return -EINVAL;
bat_priv->bat_algo_ops = bat_algo_ops;
ret = 0;
out:
return ret;
return 0;
}
int batadv_algo_seq_print_text(struct seq_file *seq, void *offset)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册