]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
spi: spi-s3c24xx: remove redundant return value check of platform_get_resource()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 20 Dec 2013 02:22:20 +0000 (10:22 +0800)
committerMark Brown <broonie@linaro.org>
Fri, 20 Dec 2013 11:56:30 +0000 (11:56 +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-s3c24xx.c

index ebf80bbc93b33f311c517322e651df125448e114..2ccb28d57ba913c2abeaad977c09b022466f0361 100644 (file)
@@ -560,14 +560,7 @@ static int s3c24xx_spi_probe(struct platform_device *pdev)
        dev_dbg(hw->dev, "bitbang at %p\n", &hw->bitbang);
 
        /* find and map our resources */
-
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (res == NULL) {
-               dev_err(&pdev->dev, "Cannot get IORESOURCE_MEM\n");
-               err = -ENOENT;
-               goto err_no_pdata;
-       }
-
        hw->regs = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(hw->regs)) {
                err = PTR_ERR(hw->regs);