Commit 973b88fb authored by Wei Yongjun's avatar Wei Yongjun Committed by Brian Norris

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 840f53c3
...@@ -268,9 +268,6 @@ static int nuc900_nand_probe(struct platform_device *pdev) ...@@ -268,9 +268,6 @@ static int nuc900_nand_probe(struct platform_device *pdev)
chip->ecc.mode = NAND_ECC_SOFT; chip->ecc.mode = NAND_ECC_SOFT;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
return -ENXIO;
nuc900_nand->reg = devm_ioremap_resource(&pdev->dev, res); nuc900_nand->reg = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(nuc900_nand->reg)) if (IS_ERR(nuc900_nand->reg))
return PTR_ERR(nuc900_nand->reg); return PTR_ERR(nuc900_nand->reg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment