From: Jonas Gorski Subject: [PATCH 1/3] spi/bcm63xx-hsspi: check result of clk_prepare_enable Date: Tue, 17 Dec 2013 21:44:46 +0100 Message-ID: <1387313088-22493-2-git-send-email-jogo@openwrt.org> References: <1387313088-22493-1-git-send-email-jogo@openwrt.org> Cc: Mark Brown , Maxime Bizon , Florian Fainelli , Kevin Cernekee To: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Return-path: In-Reply-To: <1387313088-22493-1-git-send-email-jogo-p3rKhJxN3npAfugRpC6u6w@public.gmane.org> Sender: linux-spi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Ensure we notice if the clock cannot be enabled for any reason and pass the error down. Signed-off-by: Jonas Gorski --- drivers/spi/spi-bcm63xx-hsspi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { -- 1.8.5.1 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html