arch/mips/pci: don't check resource with devm_ioremap_resource
authorWolfram Sang <wsa@the-dreams.de>
Tue, 14 Jan 2014 11:58:57 +0000 (12:58 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 24 Jan 2014 21:39:55 +0000 (22:39 +0100)
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: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6349/

arch/mips/pci/pci-rt3883.c

index adeff2bfe4cdd35ecd00419c4e8fd1338f2b4d51..72919aeef42b314d90c9ec451b149a508a4866a1 100644 (file)
@@ -436,9 +436,6 @@ static int rt3883_pci_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res)
-               return -EINVAL;
-
        rpc->base = devm_ioremap_resource(dev, res);
        if (IS_ERR(rpc->base))
                return PTR_ERR(rpc->base);