From fe2ece4a933138bb1dcb66e9669a48e7c9215717 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Fri, 20 Dec 2013 10:21:54 +0800 Subject: 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 Reviewed-by: Jingoo Han Signed-off-by: Mark Brown --- drivers/spi/spi-nuc900.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'drivers/spi/spi-nuc900.c') diff --git a/drivers/spi/spi-nuc900.c b/drivers/spi/spi-nuc900.c index 43d340ca073..50406306bc2 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); -- cgit v1.2.3-18-g5258