All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nuno Sá" <nuno.sa@analog.com>
To: <linux-iio@vger.kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Jonathan Cameron <jic23@kernel.org>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Alexandru Ardelean <alexandru.ardelean@analog.com>
Subject: [PATCH 2/2] iio: adc: adi-axi-adc: Remove unneeded check
Date: Wed, 1 Jul 2020 14:04:42 +0200	[thread overview]
Message-ID: <20200701120442.258-2-nuno.sa@analog.com> (raw)
In-Reply-To: <20200701120442.258-1-nuno.sa@analog.com>

Looking at the register path, there will be bigger issues if `dev` is
NULL. Hence, we can drop this check and assume there's no way that `dev`
can be NULL at this point.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
---
 drivers/iio/adc/adi-axi-adc.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/iio/adc/adi-axi-adc.c b/drivers/iio/adc/adi-axi-adc.c
index 86b6b65916ee..e216e37e8c8c 100644
--- a/drivers/iio/adc/adi-axi-adc.c
+++ b/drivers/iio/adc/adi-axi-adc.c
@@ -326,9 +326,6 @@ static struct adi_axi_adc_client *adi_axi_adc_attach_client(struct device *dev)
 	mutex_lock(&registered_clients_lock);
 
 	list_for_each_entry(cl, &registered_clients, entry) {
-		if (!cl->dev)
-			continue;
-
 		if (cl->dev->of_node != cln)
 			continue;
 
-- 
2.25.1


  reply	other threads:[~2020-07-01 12:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01 12:04 [PATCH 1/2] iio: adc: adi-axi-adc: Fix object reference counting Nuno Sá
2020-07-01 12:04 ` Nuno Sá [this message]
2020-07-01 13:57   ` [PATCH 2/2] iio: adc: adi-axi-adc: Remove unneeded check Ardelean, Alexandru
2020-07-01 14:07 ` [PATCH 1/2] iio: adc: adi-axi-adc: Fix object reference counting Ardelean, Alexandru
2020-07-04 16:06   ` Jonathan Cameron

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=20200701120442.258-2-nuno.sa@analog.com \
    --to=nuno.sa@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=alexandru.ardelean@analog.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.