diff mbox

[1/3] spi/bcm63xx-hsspi: check result of clk_prepare_enable

Message ID 1387313088-22493-2-git-send-email-jogo@openwrt.org (mailing list archive)
State Accepted
Commit dea5de1b37c08bc8a028b6a53145b7594ba6eb31
Delegated to: Mark Brown
Headers show

Commit Message

Jonas Gorski Dec. 17, 2013, 8:44 p.m. UTC
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>
---
 drivers/spi/spi-bcm63xx-hsspi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

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) {