mtd: nuc900_nand: remove redundant return value check of platform_get_resource()
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Tue Jan 28 00:59:07 EST 2014
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=973b88fbfa265788f01e65c8667604bf582d5961
Commit: 973b88fbfa265788f01e65c8667604bf582d5961
Parent: 840f53c31224d687a7c4a24ea118fa3c737407b0
Author: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
AuthorDate: Tue Jan 7 21:38:32 2014 +0800
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Mon Jan 20 11:38:13 2014 -0800
mtd: nuc900_nand: remove redundant return value check of platform_get_resource()
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 at trendmicro.com.cn>
Reviewed-by: Jingoo Han <jg1.han at samsung.com>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/nand/nuc900_nand.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/mtd/nand/nuc900_nand.c b/drivers/mtd/nand/nuc900_nand.c
index 661fd14..9ee09a8 100644
--- a/drivers/mtd/nand/nuc900_nand.c
+++ b/drivers/mtd/nand/nuc900_nand.c
@@ -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);
More information about the linux-mtd-cvs
mailing list