[PATCH 4/4] spi: zynq_qspi: don't check clk_get return value for NULLness

Ahmad Fatoum a.fatoum at pengutronix.de
Sat Oct 30 10:54:46 PDT 2021


clk_get never returns NULL, so no point in checking for it.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 drivers/spi/zynq_qspi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c
index d01e4a8e6c65..bd3418a3fb3e 100644
--- a/drivers/spi/zynq_qspi.c
+++ b/drivers/spi/zynq_qspi.c
@@ -559,13 +559,13 @@ static int zynq_qspi_probe(struct device_d *dev)
 	xqspi->regs = IOMEM(iores->start);
 
 	xqspi->pclk = clk_get(dev, "pclk");
-	if (IS_ERR_OR_NULL(xqspi->pclk)) {
+	if (IS_ERR(xqspi->pclk)) {
 		dev_err(dev, "pclk clock not found.\n");
 		return PTR_ERR(xqspi->pclk);
 	}
 
 	xqspi->refclk = clk_get(dev, "ref_clk");
-	if (IS_ERR_OR_NULL(xqspi->refclk)) {
+	if (IS_ERR(xqspi->refclk)) {
 		dev_err(dev, "ref_clk clock not found.\n");
 		return PTR_ERR(xqspi->refclk);
 	}
-- 
2.30.2




More information about the barebox mailing list