2013-04-18 03:15:02

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH -next] spi: omap2-mcspi: fix error return code in omap2_mcspi_probe()

From: Wei Yongjun <[email protected]>

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]>
---
drivers/spi/spi-omap2-mcspi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 893c3d7..c31a1c0 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1277,7 +1277,8 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT);
pm_runtime_enable(&pdev->dev);

- if (status || omap2_mcspi_master_setup(mcspi) < 0)
+ status = omap2_mcspi_master_setup(mcspi);
+ if (status < 0)
goto disable_pm;

status = spi_register_master(master);


2013-04-18 11:07:44

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH -next] spi: omap2-mcspi: fix error return code in omap2_mcspi_probe()

On Thu, Apr 18, 2013 at 11:14:59AM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <[email protected]>
>
> Fix to return a negative error code from the error handling
> case instead of 0, as returned elsewhere in this function.

Applied, thanks.


Attachments:
(No filename) (257.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments