diff options
author | Markus Pargmann <mpa@pengutronix.de> | 2014-12-26 12:41:41 +0100 |
---|---|---|
committer | Antonio Quartulli <antonio@meshcoding.com> | 2015-06-03 15:57:25 +0200 |
commit | f372d09059a67f57b3d2b5eab8c05b0ddb8ca92f (patch) | |
tree | 2f9ddc145ed9b2bc2dcfed44e38da3cea3f4319c /net/batman-adv/main.c | |
parent | 9fb6c6519b10aee4815591122ce59ce4b63fc44b (diff) | |
download | blackbird-op-linux-f372d09059a67f57b3d2b5eab8c05b0ddb8ca92f.tar.gz blackbird-op-linux-f372d09059a67f57b3d2b5eab8c05b0ddb8ca92f.zip |
batman-adv: Remove unnecessary ret variable in algo_register
Remove ret variable and all jumps.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Diffstat (limited to 'net/batman-adv/main.c')
-rw-r--r-- | net/batman-adv/main.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index 49f07e1e0f5f..548e405d13c1 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c @@ -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) |