[-next] spi: nuc900: remove redundant return value check of platform_get_resource()
diff mbox

Message ID CAPgLHd9rWo=vAa5xiPhi_FFheGNMOTEvt_0_AFaxMyYEJ8TBrQ@mail.gmail.com
State Accepted
Commit fe2ece4a933138bb1dcb66e9669a48e7c9215717
Headers show

Commit Message

Wei Yongjun Dec. 20, 2013, 2:21 a.m. UTC
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

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>
---
 drivers/spi/spi-nuc900.c | 6 ------
 1 file changed, 6 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Jingoo Han Dec. 20, 2013, 2:36 a.m. UTC | #1
On Friday, December 20, 2013 11:22 AM, Wei Yongjun wrote:
> 
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> 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>

Best regards,
Jingoo Han

> ---
>  drivers/spi/spi-nuc900.c | 6 ------
>  1 file changed, 6 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Brown Dec. 20, 2013, noon UTC | #2
On Fri, Dec 20, 2013 at 10:21:54AM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> 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.

Patch
diff mbox

diff --git a/drivers/spi/spi-nuc900.c b/drivers/spi/spi-nuc900.c
index 43d340c..5040630 100644
--- a/drivers/spi/spi-nuc900.c
+++ b/drivers/spi/spi-nuc900.c
@@ -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);