提交 9d6ab420 编写于 作者: W Wolfram Sang 提交者: Felipe Balbi

usb: phy: don't check resource with devm_ioremap_resource

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.
Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 2cde3935
......@@ -278,11 +278,6 @@ static int mv_u3d_phy_probe(struct platform_device *pdev)
}
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(dev, "missing mem resource\n");
return -ENODEV;
}
phy_base = devm_ioremap_resource(dev, res);
if (IS_ERR(phy_base))
return PTR_ERR(phy_base);
......
......@@ -130,11 +130,6 @@ static int mxs_phy_probe(struct platform_device *pdev)
int ret;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(&pdev->dev, "can't get device resources\n");
return -ENOENT;
}
base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base))
return PTR_ERR(base);
......
......@@ -363,11 +363,6 @@ static int samsung_usb2phy_probe(struct platform_device *pdev)
int ret;
phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!phy_mem) {
dev_err(dev, "%s: missing mem resource\n", __func__);
return -ENODEV;
}
phy_base = devm_ioremap_resource(dev, phy_mem);
if (IS_ERR(phy_base))
return PTR_ERR(phy_base);
......
......@@ -239,11 +239,6 @@ static int samsung_usb3phy_probe(struct platform_device *pdev)
int ret;
phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!phy_mem) {
dev_err(dev, "%s: missing mem resource\n", __func__);
return -ENODEV;
}
phy_base = devm_ioremap_resource(dev, phy_mem);
if (IS_ERR(phy_base))
return PTR_ERR(phy_base);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册