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>
This commit is contained in:
Fabio Estevam 2013-07-10 00:16:29 -03:00 committed by Mark Brown
parent 9c4a39afaa
commit 8498bce934
1 changed files with 3 additions and 1 deletions

View File

@ -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);