diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-12-19 21:21:54 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-12-20 07:34:44 -0500 |
commit | fe2ece4a933138bb1dcb66e9669a48e7c9215717 (patch) | |
tree | 5359dbe9b242891a79b77341f77160c9c4eac7a4 /drivers/spi | |
parent | 7519459da294680bbab1bd20a4e378d83a1c6d45 (diff) |
spi: nuc900: 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: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-nuc900.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/spi/spi-nuc900.c b/drivers/spi/spi-nuc900.c index 43d340ca0730..50406306bc20 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) | |||
368 | hw->bitbang.txrx_bufs = nuc900_spi_txrx; | 368 | hw->bitbang.txrx_bufs = nuc900_spi_txrx; |
369 | 369 | ||
370 | hw->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 370 | hw->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
371 | if (hw->res == NULL) { | ||
372 | dev_err(&pdev->dev, "Cannot get IORESOURCE_MEM\n"); | ||
373 | err = -ENOENT; | ||
374 | goto err_pdata; | ||
375 | } | ||
376 | |||
377 | hw->regs = devm_ioremap_resource(&pdev->dev, hw->res); | 371 | hw->regs = devm_ioremap_resource(&pdev->dev, hw->res); |
378 | if (IS_ERR(hw->regs)) { | 372 | if (IS_ERR(hw->regs)) { |
379 | err = PTR_ERR(hw->regs); | 373 | err = PTR_ERR(hw->regs); |