mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-20 02:34:23 +08:00
drivers/pinctrl: 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> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
7e865abb52
commit
cdaf0645db
@ -1270,11 +1270,6 @@ static int rockchip_pinctrl_probe(struct platform_device *pdev)
|
|||||||
info->dev = dev;
|
info->dev = dev;
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
if (!res) {
|
|
||||||
dev_err(dev, "cannot find IO resource\n");
|
|
||||||
return -ENOENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
info->reg_base = devm_ioremap_resource(&pdev->dev, res);
|
info->reg_base = devm_ioremap_resource(&pdev->dev, res);
|
||||||
if (IS_ERR(info->reg_base))
|
if (IS_ERR(info->reg_base))
|
||||||
return PTR_ERR(info->reg_base);
|
return PTR_ERR(info->reg_base);
|
||||||
|
@ -1075,9 +1075,6 @@ static int u300_pmx_probe(struct platform_device *pdev)
|
|||||||
upmx->dev = &pdev->dev;
|
upmx->dev = &pdev->dev;
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
if (!res)
|
|
||||||
return -ENOENT;
|
|
||||||
|
|
||||||
upmx->virtbase = devm_ioremap_resource(&pdev->dev, res);
|
upmx->virtbase = devm_ioremap_resource(&pdev->dev, res);
|
||||||
if (IS_ERR(upmx->virtbase))
|
if (IS_ERR(upmx->virtbase))
|
||||||
return PTR_ERR(upmx->virtbase);
|
return PTR_ERR(upmx->virtbase);
|
||||||
|
Loading…
Reference in New Issue
Block a user