]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mtd: nuc900_nand: remove redundant return value check of platform_get_resource()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 7 Jan 2014 13:38:32 +0000 (21:38 +0800)
committerBrian Norris <computersforpeace@gmail.com>
Mon, 20 Jan 2014 19:38:13 +0000 (11:38 -0800)
Remove unneeded error handling on the result of a call
to platform_get_resource() when the value is passed to
devm_ioremap_resource().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/nuc900_nand.c

index 661fd1417000a2dfad635552807e2e9737ecd99a..9ee09a8177c67feae055da60dcb033e9bf76f4c4 100644 (file)
@@ -268,9 +268,6 @@ static int nuc900_nand_probe(struct platform_device *pdev)
        chip->ecc.mode          = NAND_ECC_SOFT;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res)
-               return -ENXIO;
-
        nuc900_nand->reg = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(nuc900_nand->reg))
                return PTR_ERR(nuc900_nand->reg);