Commit 81359617 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by David S. Miller

net: hns3: Fix an error handling path in 'hclge_rss_init_hw()'

If this sanity check fails, we must free 'rss_indir'. Otherwise there is a
memory leak.
'goto err' as done in the other error handling paths to fix it.

Fixes: 46a3df9f ("net: hns3: Fix for setting rss_size incorrectly")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4792ea04
......@@ -2652,7 +2652,8 @@ static int hclge_rss_init_hw(struct hclge_dev *hdev)
dev_err(&hdev->pdev->dev,
"Configure rss tc size failed, invalid TC_SIZE = %d\n",
rss_size);
return -EINVAL;
ret = -EINVAL;
goto err;
}
roundup_size = roundup_pow_of_two(rss_size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment