From 8498bce934b864d609dab15a342bc47bb637c7f6 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Wed, 10 Jul 2013 00:16:29 -0300 Subject: [PATCH] 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 Acked-by: Marek Vasut Signed-off-by: Mark Brown --- drivers/spi/spi-mxs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.34.1