[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <23ffeeb2-6795-dcb5-8bfb-9e385d9960d9@gmail.com>
Date: Sat, 25 Sep 2021 10:38:41 -0600
From: David Ahern <dsahern@...il.com>
To: MichelleJin <shjy180909@...il.com>, davem@...emloft.net,
kuba@...nel.org, yoshfuji@...ux-ipv6.org, dsahern@...nel.org,
johannes@...solutions.net
Cc: saeedm@...dia.com, leon@...nel.org, roid@...dia.com,
paulb@...dia.com, ozsh@...dia.com, vladbu@...dia.com,
lariel@...dia.com, cmi@...dia.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v3 2/3] net: ipv6: check return value of
rhashtable_init
On 9/25/21 12:10 AM, MichelleJin wrote:
> diff --git a/net/ipv6/seg6_hmac.c b/net/ipv6/seg6_hmac.c
> index 687d95dce085..a78554993163 100644
> --- a/net/ipv6/seg6_hmac.c
> +++ b/net/ipv6/seg6_hmac.c
> @@ -403,9 +403,13 @@ EXPORT_SYMBOL(seg6_hmac_init);
>
> int __net_init seg6_hmac_net_init(struct net *net)
> {
> + int err;
> +
> struct seg6_pernet_data *sdata = seg6_pernet(net);
>
> - rhashtable_init(&sdata->hmac_infos, &rht_params);
> + err = rhashtable_init(&sdata->hmac_infos, &rht_params);
> + if (err)
> + return err;
>
> return 0;
Just:
return rhashtable_init(&sdata->hmac_infos, &rht_params);
Powered by blists - more mailing lists