浏览代码

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 <jogo@openwrt.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Jonas Gorski 11 年之前
父节点
当前提交
dea5de1b37
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      drivers/spi/spi-bcm63xx-hsspi.c

+ 3 - 1
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) {