drivers/pinctrl: don't check resource with devm_ioremap_resource
authorWolfram Sang <wsa@the-dreams.de>
Tue, 23 Jul 2013 18:01:47 +0000 (20:01 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 7 Aug 2013 20:29:21 +0000 (22:29 +0200)
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>
drivers/pinctrl/pinctrl-rockchip.c
drivers/pinctrl/pinctrl-u300.c

index dc90c0239771b174f11fc049bf4a1ece4c9d398f..c22457de0048adb5e13c938ba62643dcbf432559 100644 (file)
@@ -1270,11 +1270,6 @@ static int rockchip_pinctrl_probe(struct platform_device *pdev)
        info->dev = dev;
 
        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);
        if (IS_ERR(info->reg_base))
                return PTR_ERR(info->reg_base);
index 46a152d1735500fcb22320301fddd00d20f66c52..6fbdc06d299811b95c90b3b2f41e2b8985eeca53 100644 (file)
@@ -1075,9 +1075,6 @@ static int u300_pmx_probe(struct platform_device *pdev)
        upmx->dev = &pdev->dev;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res)
-               return -ENOENT;
-
        upmx->virtbase = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(upmx->virtbase))
                return PTR_ERR(upmx->virtbase);