[PATCH] net/batman-adv:remove unneeded variable

From: cgel . zte
Date: Thu Dec 09 2021 - 21:19:24 EST


From: Minghao Chi <chi.minghao@xxxxxxxxxx>

Return status directly from function called.

Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: Minghao Chi <chi.minghao@xxxxxxxxxx>
---
net/batman-adv/network-coding.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/net/batman-adv/network-coding.c b/net/batman-adv/network-coding.c
index 0a7f1d36a6a8..0c300476d335 100644
--- a/net/batman-adv/network-coding.c
+++ b/net/batman-adv/network-coding.c
@@ -58,13 +58,9 @@ static int batadv_nc_recv_coded_packet(struct sk_buff *skb,
*/
int __init batadv_nc_init(void)
{
- int ret;
-
/* Register our packet type */
- ret = batadv_recv_handler_register(BATADV_CODED,
+ return batadv_recv_handler_register(BATADV_CODED,
batadv_nc_recv_coded_packet);
-
- return ret;
}

/**
--
2.25.1