drivers/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. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
bb522812a1
commit
9c5fdd3827
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue