From: Jonas Gorski Date: Tue, 17 Dec 2013 20:44:46 +0000 (+0100) Subject: spi/bcm63xx-hsspi: check result of clk_prepare_enable X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=dea5de1b37c08bc8a028b6a53145b7594ba6eb31;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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) {