mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 4/4] spi: zynq_qspi: don't check clk_get return value for NULLness
Date: Sat, 30 Oct 2021 19:54:46 +0200	[thread overview]
Message-ID: <20211030175446.2274194-4-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20211030175446.2274194-1-a.fatoum@pengutronix.de>

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

Signed-off-by: Ahmad Fatoum <a.fatoum@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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  parent reply	other threads:[~2021-10-30 17:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-30 17:54 [PATCH 1/4] misc: acpi-test: bump down debug message on remove Ahmad Fatoum
2021-10-30 17:54 ` [PATCH 2/4] usb: dwc3: remove unneeded EPROBE_DEFER check Ahmad Fatoum
2021-10-30 17:54 ` [PATCH 3/4] serial: atmel: abort probe on atmel_serial_init_port failure Ahmad Fatoum
2021-10-30 17:54 ` Ahmad Fatoum [this message]
2021-11-01 10:28 ` [PATCH 1/4] misc: acpi-test: bump down debug message on remove Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211030175446.2274194-4-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox