summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/qedr/main.c
diff options
context:
space:
mode:
authorMichal Kalderon <michal.kalderon@marvell.com>2020-09-02 19:57:36 +0300
committerJason Gunthorpe <jgg@nvidia.com>2020-09-11 10:24:54 -0300
commita379ad54e55a12618cae7f6333fd1b3071de9606 (patch)
tree02316620c2a863fd330c2f8f716a779f2f9602ae /drivers/infiniband/hw/qedr/main.c
parent0b1eddc1964351cd5ce57aff46853ed4ce9ebbff (diff)
downloadlinux-a379ad54e55a12618cae7f6333fd1b3071de9606.tar.bz2
RDMA/qedr: Fix use of uninitialized field
dev->attr.page_size_caps was used uninitialized when setting device attributes Fixes: ec72fce401c6 ("qedr: Add support for RoCE HW init") Link: https://lore.kernel.org/r/20200902165741.8355-4-michal.kalderon@marvell.com Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/qedr/main.c')
-rw-r--r--drivers/infiniband/hw/qedr/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/qedr/main.c b/drivers/infiniband/hw/qedr/main.c
index d85f992bac29..8e1365951fb6 100644
--- a/drivers/infiniband/hw/qedr/main.c
+++ b/drivers/infiniband/hw/qedr/main.c
@@ -602,7 +602,7 @@ static int qedr_set_device_attr(struct qedr_dev *dev)
qed_attr = dev->ops->rdma_query_device(dev->rdma_ctx);
/* Part 2 - check capabilities */
- page_size = ~dev->attr.page_size_caps + 1;
+ page_size = ~qed_attr->page_size_caps + 1;
if (page_size > PAGE_SIZE) {
DP_ERR(dev,
"Kernel PAGE_SIZE is %ld which is smaller than minimum page size (%d) required by qedr\n",