Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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@trendmicro.com.cn>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>

authored by

Wei Yongjun and committed by
Brian Norris
973b88fb 840f53c3

-3
-3
drivers/mtd/nand/nuc900_nand.c
··· 268 268 chip->ecc.mode = NAND_ECC_SOFT; 269 269 270 270 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 271 - if (!res) 272 - return -ENXIO; 273 - 274 271 nuc900_nand->reg = devm_ioremap_resource(&pdev->dev, res); 275 272 if (IS_ERR(nuc900_nand->reg)) 276 273 return PTR_ERR(nuc900_nand->reg);