spi: nuc900: remove redundant return value check of platform_get_resource()
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
@@ -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);
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 todevm_ioremap_resource().Signed-off-by Wei Yongjun <[email protected]>
Best regards,
Jingoo Han
Quoted 3 lines
--- drivers/spi/spi-nuc900.c | 6 ------ 1 file changed, 6 deletions(-)
Mark Brown
maintainerPATCH 1/1 spi: nuc900: remove redundant return value check of platform_get_resource()
In reply to Wei YongjunQuoted 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 todevm_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>