spi: nuc900: remove redundant return value check of platform_get_resource()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 20 Dec 2013 02:21:54 +0000 (10:21 +0800)
committerMark Brown <broonie@linaro.org>
Fri, 20 Dec 2013 12:34:44 +0000 (12:34 +0000)
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>
drivers/spi/spi-nuc900.c

index 43d340ca07307b00f4fa184195b9cd7719d72880..50406306bc209493152eca0a5b636811e30593d6 100644 (file)
@@ -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);