summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-mxs.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-07-10 00:16:29 -0300
committerMark Brown <broonie@linaro.org>2013-07-15 11:38:42 +0100
commit8498bce934b864d609dab15a342bc47bb637c7f6 (patch)
tree9cfaf0b54801005ef197b5b1c1fb73aee1434d67 /drivers/spi/spi-mxs.c
parent9c4a39afaa2ef8f96b7bda1ffb5deef0e98ad189 (diff)
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.c4
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);