linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] spi: omap2-mcspi: fix error return code in omap2_mcspi_probe()
@ 2013-04-18  3:14 Wei Yongjun
  2013-04-18 11:07 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-04-18  3:14 UTC (permalink / raw)
  To: grant.likely, broonie, rob.herring
  Cc: yongjun_wei, spi-devel-general, devicetree-discuss, linux-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

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 <yongjun_wei@trendmicro.com.cn>
---
 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);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] spi: omap2-mcspi: fix error return code in omap2_mcspi_probe()
  2013-04-18  3:14 [PATCH -next] spi: omap2-mcspi: fix error return code in omap2_mcspi_probe() Wei Yongjun
@ 2013-04-18 11:07 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-04-18 11:07 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: grant.likely, rob.herring, yongjun_wei, spi-devel-general,
	devicetree-discuss, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 264 bytes --]

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

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-18 11:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-18  3:14 [PATCH -next] spi: omap2-mcspi: fix error return code in omap2_mcspi_probe() Wei Yongjun
2013-04-18 11:07 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).