spi/bcm63xx-hsspi: check result of clk_prepare_enable
authorJonas Gorski <jogo@openwrt.org>
Tue, 17 Dec 2013 20:44:46 +0000 (21:44 +0100)
committerMark Brown <broonie@linaro.org>
Tue, 17 Dec 2013 22:32:17 +0000 (22:32 +0000)
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>
drivers/spi/spi-bcm63xx-hsspi.c

index 6a763a8a8a5e707d84dcb0d3448346086790ef9f..949dfb57fe89c93dabe61b3d072fba8307b97981 100644 (file)
@@ -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) {