Skip to contentSkip to conversation

spi: nuc900: remove redundant return value check of platform_get_resource()

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

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi: nuc900: 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-nuc900.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/spi/spi-nuc900.c +0 -6
index 43d340c..5040630 100644
@@ -368,12 +368,6 @@ static int nuc900_spi_probe(struct platform_device *pdev)
 	hw->bitbang.txrx_bufs      = nuc900_spi_txrx;
 
 	hw->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (hw->res == NULL) {
-		dev_err(&pdev->dev, "Cannot get IORESOURCE_MEM\n");
-		err = -ENOENT;
-		goto err_pdata;
-	}
-
 	hw->regs = devm_ioremap_resource(&pdev->dev, hw->res);
 	if (IS_ERR(hw->regs)) {
 		err = PTR_ERR(hw->regs);
#1 lore raw

PATCH 1/1 spi: nuc900: 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-nuc900.c | 6 ------
 1 file changed, 6 deletions(-)
maintainer
#2 lore raw

PATCH 1/1 spi: nuc900: 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/60ba73d9/attachment.sig>