diff options
author | Jonas Gorski <jogo@openwrt.org> | 2013-12-17 15:44:46 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-12-17 17:32:17 -0500 |
commit | dea5de1b37c08bc8a028b6a53145b7594ba6eb31 (patch) | |
tree | 5b95060a272071817944c2b6041daefdb144c02d | |
parent | b1bdd4f883e1938a1921f300d7f164ce583b1a64 (diff) |
spi/bcm63xx-hsspi: check result of clk_prepare_enable
Ensure we notice if the clock cannot be enabled for any reason and pass
the error down.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | drivers/spi/spi-bcm63xx-hsspi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c index 6a763a8a8a5e..949dfb57fe89 100644 --- a/drivers/spi/spi-bcm63xx-hsspi.c +++ b/drivers/spi/spi-bcm63xx-hsspi.c | |||
@@ -351,7 +351,9 @@ static int bcm63xx_hsspi_probe(struct platform_device *pdev) | |||
351 | if (!rate) | 351 | if (!rate) |
352 | return -EINVAL; | 352 | return -EINVAL; |
353 | 353 | ||
354 | clk_prepare_enable(clk); | 354 | ret = clk_prepare_enable(clk); |
355 | if (ret) | ||
356 | return ret; | ||
355 | 357 | ||
356 | master = spi_alloc_master(&pdev->dev, sizeof(*bs)); | 358 | master = spi_alloc_master(&pdev->dev, sizeof(*bs)); |
357 | if (!master) { | 359 | if (!master) { |