diff options
author | Jonas Gorski <jogo@openwrt.org> | 2013-12-17 21:44:46 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-12-17 22:32:17 +0000 |
commit | dea5de1b37c08bc8a028b6a53145b7594ba6eb31 (patch) | |
tree | 5b95060a272071817944c2b6041daefdb144c02d /drivers/spi | |
parent | b1bdd4f883e1938a1921f300d7f164ce583b1a64 (diff) | |
download | op-kernel-dev-dea5de1b37c08bc8a028b6a53145b7594ba6eb31.zip op-kernel-dev-dea5de1b37c08bc8a028b6a53145b7594ba6eb31.tar.gz |
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>
Diffstat (limited to 'drivers/spi')
-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 6a763a8..949dfb5 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) if (!rate) return -EINVAL; - clk_prepare_enable(clk); + ret = clk_prepare_enable(clk); + if (ret) + return ret; master = spi_alloc_master(&pdev->dev, sizeof(*bs)); if (!master) { |