]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mtd: brcmnand: defer to devm_ioremap_resource() for error checking
authorBrian Norris <computersforpeace@gmail.com>
Thu, 10 Dec 2015 02:33:17 +0000 (18:33 -0800)
committerBrian Norris <computersforpeace@gmail.com>
Thu, 10 Dec 2015 21:08:08 +0000 (13:08 -0800)
devm_ioremap_resource() does error checking on the 'res' argument, so
drop the error check in bcm6368_nand.c.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Tested-by: Simon Arlott <simon@fire.lp0.eu>
drivers/mtd/nand/brcmnand/bcm6368_nand.c

index 7f5359be24f2eda36462e952c3d94e7b780cb155..34c91b0e1e6944411bb0af96dd6a15a5eb664903 100644 (file)
@@ -105,9 +105,6 @@ static int bcm6368_nand_probe(struct platform_device *pdev)
 
        res = platform_get_resource_byname(pdev,
                IORESOURCE_MEM, "nand-int-base");
-       if (!res)
-               return -EINVAL;
-
        priv->base = devm_ioremap_resource(dev, res);
        if (IS_ERR(priv->base))
                return PTR_ERR(priv->base);