[PATCH 5/7] spi: bcm63xx: Don't check clk_free

Sean Anderson seanga2 at gmail.com
Sat Jan 15 23:25:02 CET 2022


This function always succeeds, so don't check its return value.

Signed-off-by: Sean Anderson <seanga2 at gmail.com>
---

 drivers/spi/bcm63xx_hsspi.c | 8 ++------
 drivers/spi/bcm63xx_spi.c   | 4 +---
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/spi/bcm63xx_hsspi.c b/drivers/spi/bcm63xx_hsspi.c
index 85108df565..47002f8b56 100644
--- a/drivers/spi/bcm63xx_hsspi.c
+++ b/drivers/spi/bcm63xx_hsspi.c
@@ -355,9 +355,7 @@ static int bcm63xx_hsspi_probe(struct udevice *dev)
 	if (ret < 0 && ret != -ENOSYS)
 		return ret;
 
-	ret = clk_free(&clk);
-	if (ret < 0 && ret != -ENOSYS)
-		return ret;
+	clk_free(&clk);
 
 	/* get clock rate */
 	ret = clk_get_by_name(dev, "pll", &clk);
@@ -366,9 +364,7 @@ static int bcm63xx_hsspi_probe(struct udevice *dev)
 
 	priv->clk_rate = clk_get_rate(&clk);
 
-	ret = clk_free(&clk);
-	if (ret < 0 && ret != -ENOSYS)
-		return ret;
+	clk_free(&clk);
 
 	/* perform reset */
 	ret = reset_get_by_index(dev, 0, &rst_ctl);
diff --git a/drivers/spi/bcm63xx_spi.c b/drivers/spi/bcm63xx_spi.c
index dd5e62b2fe..0600d56c69 100644
--- a/drivers/spi/bcm63xx_spi.c
+++ b/drivers/spi/bcm63xx_spi.c
@@ -391,9 +391,7 @@ static int bcm63xx_spi_probe(struct udevice *dev)
 	if (ret < 0)
 		return ret;
 
-	ret = clk_free(&clk);
-	if (ret < 0)
-		return ret;
+	clk_free(&clk);
 
 	/* perform reset */
 	ret = reset_get_by_index(dev, 0, &rst_ctl);
-- 
2.34.1



More information about the U-Boot mailing list