diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2013-07-10 05:16:29 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-07-15 12:38:42 +0200 |
commit | 8498bce934b864d609dab15a342bc47bb637c7f6 (patch) | |
tree | 9cfaf0b54801005ef197b5b1c1fb73aee1434d67 /drivers/spi/spi-mxs.c | |
parent | spi: spi-mxs: Check the return value from clk_prepare_enable() (diff) | |
download | linux-8498bce934b864d609dab15a342bc47bb637c7f6.tar.xz linux-8498bce934b864d609dab15a342bc47bb637c7f6.zip |
spi: spi-mxs: Check the return value from stmp_reset_block()
stmp_reset_block() may fail, so let's check its return value and propagate it in
the case of error.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-mxs.c')
-rw-r--r-- | drivers/spi/spi-mxs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c index ecc59444875c..5b0a8e309197 100644 --- a/drivers/spi/spi-mxs.c +++ b/drivers/spi/spi-mxs.c @@ -570,7 +570,9 @@ static int mxs_spi_probe(struct platform_device *pdev) clk_set_rate(ssp->clk, clk_freq); ssp->clk_rate = clk_get_rate(ssp->clk) / 1000; - stmp_reset_block(ssp->base); + ret = stmp_reset_block(ssp->base); + if (ret) + goto out_disable_clk; platform_set_drvdata(pdev, master); |