From dea5de1b37c08bc8a028b6a53145b7594ba6eb31 Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Tue, 17 Dec 2013 21:44:46 +0100 Subject: 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 Signed-off-by: Mark Brown --- drivers/spi/spi-bcm63xx-hsspi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/spi') 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) 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) { -- cgit v1.2.3