]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/hns: Fix uninitialized variable
authorYixing Liu <liuyixing1@huawei.com>
Fri, 18 Jun 2021 10:10:12 +0000 (18:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 15:00:00 +0000 (17:00 +0200)
commit9007ce91eb745fc9564cca697aa277b8cedee24e
treeba33a4fe419a5becb3373d04a3eb1f340992cb7a
parent3523af4118d7cf5f901f41a59bbfc90c1226c1a9
RDMA/hns: Fix uninitialized variable

[ Upstream commit 2a38c0f10e6d7d28e06ff1eb1f350804c4850275 ]

A random value will be returned if the condition below is not met, so it
needs to be initialized.

Fixes: 9ea9a53ea93b ("RDMA/hns: Add mapped page count checking for MTR")
Link: https://lore.kernel.org/r/1624011020-16992-3-git-send-email-liweihang@huawei.com
Signed-off-by: Yixing Liu <liuyixing1@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/hns/hns_roce_mr.c