summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-mpc512x-psc.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-09-11 19:15:39 +0800
committerMark Brown <broonie@linaro.org>2013-09-12 10:48:57 +0100
commiteadf69cf5e1cdd042fb7b7beeffa538a935373cd (patch)
tree0272f1a557307a5e0d4124715ff5097a6c1df05a /drivers/spi/spi-mpc512x-psc.c
parent578739259875a93b1869d25cdf4a8bd963b7d0a7 (diff)
downloadtalos-obmc-linux-eadf69cf5e1cdd042fb7b7beeffa538a935373cd.tar.gz
talos-obmc-linux-eadf69cf5e1cdd042fb7b7beeffa538a935373cd.zip
spi: mpc512x: fix error return code in mpc512x_psc_spi_do_probe()
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> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-mpc512x-psc.c')
-rw-r--r--drivers/spi/spi-mpc512x-psc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/spi/spi-mpc512x-psc.c b/drivers/spi/spi-mpc512x-psc.c
index dbc5e999a1f5..6adf4e35816d 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;
OpenPOWER on IntegriCloud