aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hns
diff options
context:
space:
mode:
authorweiyongjun (A) <weiyongjun1@huawei.com>2018-01-17 11:28:38 +0000
committerDoug Ledford <dledford@redhat.com>2018-01-18 14:49:21 -0500
commit0b5fe5c43ab67130d259d800fcc109c7340acb63 (patch)
treeba80926ef5b5692822e77a4b3479842a715b0a7a /drivers/infiniband/hw/hns
parentIB/mlx5: Mmap the HCA's clock info to user-space (diff)
downloadlinux-dev-0b5fe5c43ab67130d259d800fcc109c7340acb63.tar.xz
linux-dev-0b5fe5c43ab67130d259d800fcc109c7340acb63.zip
RDMA/hns: Remove unnecessary platform_get_resource() error check
devm_ioremap_resource() already checks if the resource is NULL, so remove the unnecessary platform_get_resource() error check. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hns')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_hw_v1.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
index 833a305085ef..21ca9fa7c9d1 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
@@ -4788,10 +4788,6 @@ static int hns_roce_get_cfg(struct hns_roce_dev *hr_dev)
/* get the mapped register base address */
res = platform_get_resource(hr_dev->pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(dev, "memory resource not found!\n");
- return -EINVAL;
- }
hr_dev->reg_base = devm_ioremap_resource(dev, res);
if (IS_ERR(hr_dev->reg_base))
return PTR_ERR(hr_dev->reg_base);