All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	linux-gpio@vger.kernel.org, Jean Delvare <jdelvare@suse.com>,
	Wolfram Sang <wsa@kernel.org>,
	linux-i2c@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 2/3] i2c: i801: Drop duplicate NULL check in i801_del_mux()
Date: Mon, 28 Dec 2020 22:06:17 +0200	[thread overview]
Message-ID: <20201228200618.58716-2-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20201228200618.58716-1-andriy.shevchenko@linux.intel.com>

Since gpiod_remove_lookup_table() is NULL-aware, no need to have this check
in the caller. Drop duplicate NULL check.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/i2c/busses/i2c-i801.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index ae90713443fa..7c2569a18f8c 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -1487,8 +1487,7 @@ static void i801_del_mux(struct i801_priv *priv)
 {
 	if (priv->mux_pdev)
 		platform_device_unregister(priv->mux_pdev);
-	if (priv->lookup)
-		gpiod_remove_lookup_table(priv->lookup);
+	gpiod_remove_lookup_table(priv->lookup);
 }
 
 static unsigned int i801_get_adapter_class(struct i801_priv *priv)
-- 
2.29.2


  reply	other threads:[~2020-12-28 23:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-28 20:06 [PATCH v1 1/3] gpiolib: Follow usual pattern for gpiod_remove_lookup_table() call Andy Shevchenko
2020-12-28 20:06 ` Andy Shevchenko [this message]
2021-01-06 16:03   ` [PATCH v1 2/3] i2c: i801: Drop duplicate NULL check in i801_del_mux() Jean Delvare
2020-12-28 20:06 ` [PATCH v1 3/3] i2c: i801: Refactor mux code since platform_device_unregister() is NULL aware Andy Shevchenko
2021-01-06 16:03   ` Jean Delvare
2021-01-04 14:24 ` [PATCH v1 1/3] gpiolib: Follow usual pattern for gpiod_remove_lookup_table() call Bartosz Golaszewski
2021-01-04 14:33   ` Andy Shevchenko
2021-01-04 14:59     ` Bartosz Golaszewski
2021-01-06 16:03 ` Jean Delvare

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=20201228200618.58716-2-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=jdelvare@suse.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=wsa@kernel.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 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.