Skip to contentSkip to conversation

net/ipv6: remove unneeded err variable

PATCH New [email protected] 1 participant 1 message Jan 18, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ipv6: remove unneeded err variable

From: Minghao Chi <[email protected]>

Return value from rhashtable_lookup_insert_fast() directly instead of taking this in another redundant variable.

---
 net/ipv6/seg6_hmac.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
net/ipv6/seg6_hmac.c +1 -4
index 29bc4e7c3046..f8e25e3a5944 100644
@@ -291,12 +291,9 @@ EXPORT_SYMBOL(seg6_hmac_info_lookup);
 int seg6_hmac_info_add(struct net *net, u32 key, struct seg6_hmac_info *hinfo)
 {
 	struct seg6_pernet_data *sdata = seg6_pernet(net);
-	int err;
 
-	err = rhashtable_lookup_insert_fast(&sdata->hmac_infos, &hinfo->node,
+	return rhashtable_lookup_insert_fast(&sdata->hmac_infos, &hinfo->node,
 					    rht_params);
-
-	return err;
 }
 EXPORT_SYMBOL(seg6_hmac_info_add);
 
Signature · 1 line
2.25.1