diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-09-11 07:15:39 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-12 05:48:57 -0400 |
commit | eadf69cf5e1cdd042fb7b7beeffa538a935373cd (patch) | |
tree | 0272f1a557307a5e0d4124715ff5097a6c1df05a /drivers/spi | |
parent | 578739259875a93b1869d25cdf4a8bd963b7d0a7 (diff) |
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')
-rw-r--r-- | drivers/spi/spi-mpc512x-psc.c | 4 |
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, | |||
522 | psc_num = master->bus_num; | 522 | psc_num = master->bus_num; |
523 | snprintf(clk_name, sizeof(clk_name), "psc%d_mclk", psc_num); | 523 | snprintf(clk_name, sizeof(clk_name), "psc%d_mclk", psc_num); |
524 | clk = devm_clk_get(dev, clk_name); | 524 | clk = devm_clk_get(dev, clk_name); |
525 | if (IS_ERR(clk)) | 525 | if (IS_ERR(clk)) { |
526 | ret = PTR_ERR(clk); | ||
526 | goto free_irq; | 527 | goto free_irq; |
528 | } | ||
527 | ret = clk_prepare_enable(clk); | 529 | ret = clk_prepare_enable(clk); |
528 | if (ret) | 530 | if (ret) |
529 | goto free_irq; | 531 | goto free_irq; |