mtd: brcmnand: defer to devm_ioremap_resource() for error checking

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Jan 12 15:59:16 PST 2016


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=207f6582dd9adb8e2ed64b4c64d6d5c009e5bbf9
Commit:     207f6582dd9adb8e2ed64b4c64d6d5c009e5bbf9
Parent:     af3855dd191799a797e80dc55ecd5a9a226c3e2c
Author:     Brian Norris <computersforpeace at gmail.com>
AuthorDate: Wed Dec 9 18:33:17 2015 -0800
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Thu Dec 10 13:08:08 2015 -0800

    mtd: brcmnand: defer to devm_ioremap_resource() for error checking
    
    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 at gmail.com>
    Tested-by: Simon Arlott <simon at fire.lp0.eu>
---
 drivers/mtd/nand/brcmnand/bcm6368_nand.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/mtd/nand/brcmnand/bcm6368_nand.c b/drivers/mtd/nand/brcmnand/bcm6368_nand.c
index 7f5359b..34c91b0 100644
--- a/drivers/mtd/nand/brcmnand/bcm6368_nand.c
+++ b/drivers/mtd/nand/brcmnand/bcm6368_nand.c
@@ -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);



More information about the linux-mtd-cvs mailing list