Skip to contentSkip to conversation

spi: spi-s3c24xx: remove redundant return value check of platform_get_resource()

PATCH New Wei Yongjun 3 participants 3 messages Dec 20, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi: spi-s3c24xx: remove redundant return value check of platform_get_resource()

From: Wei Yongjun <[email protected]>

Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource().

---
 drivers/spi/spi-s3c24xx.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/spi/spi-s3c24xx.c +0 -7
index ebf80bb..2ccb28d 100644
@@ -560,14 +560,7 @@ static int s3c24xx_spi_probe(struct platform_device *pdev)
 	dev_dbg(hw->dev, "bitbang at %p\n", &hw->bitbang);
 
 	/* find and map our resources */
-
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (res == NULL) {
-		dev_err(&pdev->dev, "Cannot get IORESOURCE_MEM\n");
-		err = -ENOENT;
-		goto err_no_pdata;
-	}
-
 	hw->regs = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(hw->regs)) {
 		err = PTR_ERR(hw->regs);
#1 lore raw

PATCH 1/1 spi: spi-s3c24xx: remove redundant return value check of platform_get_resource()

Quoted 8 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource().

Best regards,
Jingoo Han

Quoted 3 lines
---
 drivers/spi/spi-s3c24xx.c | 7 -------
 1 file changed, 7 deletions(-)
maintainer
#2 lore raw

PATCH 1/1 spi: spi-s3c24xx: remove redundant return value check of platform_get_resource()

In reply to Wei Yongjun
Quoted 5 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource().

Applied, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131220/e86a160d/attachment.sig>