spi: coldfire-qspi: remove redundant return value check of platform_get_resource()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Sat, 7 Dec 2013 06:00:40 +0000 (14:00 +0800)
committerMark Brown <broonie@linaro.org>
Mon, 9 Dec 2013 17:04:56 +0000 (17:04 +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>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-coldfire-qspi.c

index 9ee81a4c73511f9e70e1197f17b1271e9ec47f9b..cabed8f9119e1af30d80766420d548b94567c91c 100644 (file)
@@ -397,12 +397,6 @@ static int mcfqspi_probe(struct platform_device *pdev)
        mcfqspi = spi_master_get_devdata(master);
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res) {
-               dev_dbg(&pdev->dev, "platform_get_resource failed\n");
-               status = -ENXIO;
-               goto fail0;
-       }
-
        mcfqspi->iobase = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(mcfqspi->iobase)) {
                status = PTR_ERR(mcfqspi->iobase);