2013-04-03 13:06:43

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH -next] mxs/spi: fix error return code in mxs_spi_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-mxs.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c
index 7b1c014..8498276 100644
--- a/drivers/spi/spi-mxs.c
+++ b/drivers/spi/spi-mxs.c
@@ -570,6 +570,7 @@ static int mxs_spi_probe(struct platform_device *pdev)
ssp->dmach = dma_request_slave_channel(&pdev->dev, "rx-tx");
if (!ssp->dmach) {
dev_err(ssp->dev, "Failed to request DMA\n");
+ ret = -ENODEV;
goto out_master_free;
}


2013-04-03 17:37:58

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH -next] mxs/spi: fix error return code in mxs_spi_probe()

On Wed, Apr 03, 2013 at 09:06:40PM +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