devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: mpc512x: fix error return code in mpc512x_psc_spi_do_probe()
@ 2013-09-11 11:15 Wei Yongjun
  2013-09-12  9:49 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-09-11 11:15 UTC (permalink / raw)
  To: broonie, grant.likely, rob.herring; +Cc: yongjun_wei, linux-spi, devicetree

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

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/spi/spi-mpc512x-psc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-mpc512x-psc.c b/drivers/spi/spi-mpc512x-psc.c
index dbc5e99..6adf4e3 100644
--- a/drivers/spi/spi-mpc512x-psc.c
+++ b/drivers/spi/spi-mpc512x-psc.c
@@ -522,8 +522,10 @@ static int mpc512x_psc_spi_do_probe(struct device *dev, u32 regaddr,
 	psc_num = master->bus_num;
 	snprintf(clk_name, sizeof(clk_name), "psc%d_mclk", psc_num);
 	clk = devm_clk_get(dev, clk_name);
-	if (IS_ERR(clk))
+	if (IS_ERR(clk)) {
+		ret = PTR_ERR(clk);
 		goto free_irq;
+	}
 	ret = clk_prepare_enable(clk);
 	if (ret)
 		goto free_irq;


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

* Re: [PATCH] spi: mpc512x: fix error return code in mpc512x_psc_spi_do_probe()
  2013-09-11 11:15 [PATCH] spi: mpc512x: fix error return code in mpc512x_psc_spi_do_probe() Wei Yongjun
@ 2013-09-12  9:49 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-09-12  9:49 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: grant.likely, rob.herring, yongjun_wei, linux-spi, devicetree

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

On Wed, Sep 11, 2013 at 07:15:39PM +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 done 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-09-12  9:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-11 11:15 [PATCH] spi: mpc512x: fix error return code in mpc512x_psc_spi_do_probe() Wei Yongjun
2013-09-12  9:49 ` 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).