spi: omap2-mcspi: remove redundant check for error status
authorColin Ian King <colin.king@canonical.com>
Thu, 25 May 2017 16:51:34 +0000 (17:51 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 26 May 2017 11:40:11 +0000 (12:40 +0100)
The check to see if status is less than zero is actually redundant
as all previous places where it is -ve have already branched to the
exit paths, so it is never less than zero at the check.

Detected by CoverityScan, CID#1357119 ("Logically dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-omap2-mcspi.c

index 7275223dbcd454d879bbb7a61e2ee50479212da8..e048268d8ba25e58d8e23e0011f7470e7d99cbfe 100644 (file)
@@ -1412,9 +1412,6 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
                sprintf(mcspi->dma_channels[i].dma_tx_ch_name, "tx%d", i);
        }
 
-       if (status < 0)
-               goto free_master;
-
        pm_runtime_use_autosuspend(&pdev->dev);
        pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT);
        pm_runtime_enable(&pdev->dev);