Skip to content

Commit 142e07b

Browse files
Wei Yongjunbroonie
authored andcommitted
spi: omap2-mcspi: fix error return code in omap2_mcspi_probe()
Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 00ab539 commit 142e07b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/spi/spi-omap2-mcspi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,8 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
12931293
pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT);
12941294
pm_runtime_enable(&pdev->dev);
12951295

1296-
if (status || omap2_mcspi_master_setup(mcspi) < 0)
1296+
status = omap2_mcspi_master_setup(mcspi);
1297+
if (status < 0)
12971298
goto disable_pm;
12981299

12991300
status = spi_register_master(master);

0 commit comments

Comments
 (0)