linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Patrick Rudolph <patrick.rudolph@9elements.com>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH v3 05/10] pinctrl: cy8c95x0: Replace 'return ret' by 'return 0' in some cases
Date: Wed,  5 Feb 2025 11:51:15 +0200	[thread overview]
Message-ID: <20250205095243.512292-6-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20250205095243.512292-1-andriy.shevchenko@linux.intel.com>

When it's known that the returned value can't be non-zero,
use 'return 0' explicitly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/pinctrl-cy8c95x0.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-cy8c95x0.c b/drivers/pinctrl/pinctrl-cy8c95x0.c
index 04b534b950d0..19f92ec83871 100644
--- a/drivers/pinctrl/pinctrl-cy8c95x0.c
+++ b/drivers/pinctrl/pinctrl-cy8c95x0.c
@@ -517,7 +517,7 @@ static int cy8c95x0_regmap_update_bits_base(struct cy8c95x0_pinctrl *chip,
 		regcache_cache_only(chip->regmap, false);
 	}
 
-	return ret;
+	return 0;
 }
 
 /**
@@ -1286,7 +1286,7 @@ static int cy8c95x0_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
 				unsigned long *configs, unsigned int num_configs)
 {
 	struct cy8c95x0_pinctrl *chip = pinctrl_dev_get_drvdata(pctldev);
-	int ret = 0;
+	int ret;
 	int i;
 
 	for (i = 0; i < num_configs; i++) {
@@ -1295,7 +1295,7 @@ static int cy8c95x0_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
 			return ret;
 	}
 
-	return ret;
+	return 0;
 }
 
 static const struct pinconf_ops cy8c95x0_pinconf_ops = {
-- 
2.43.0.rc1.1336.g36b5255a03ac


  parent reply	other threads:[~2025-02-05  9:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05  9:51 [PATCH v3 00/10] pinctrl: cy8c95x0: Clean up series Andy Shevchenko
2025-02-05  9:51 ` [PATCH v3 01/10] pinctrl: cy8c95x0: Use better bitmap APIs where appropriate Andy Shevchenko
2025-02-05  9:51 ` [PATCH v3 02/10] pinctrl: cy8c95x0; Switch to use for_each_set_clump8() Andy Shevchenko
2025-02-05  9:51 ` [PATCH v3 03/10] pinctrl: cy8c95x0: Transform to cy8c95x0_regmap_read_bits() Andy Shevchenko
2025-02-05  9:51 ` [PATCH v3 04/10] pinctrl: cy8c95x0: Remove redundant check in cy8c95x0_regmap_update_bits_base() Andy Shevchenko
2025-02-05  9:51 ` Andy Shevchenko [this message]
2025-02-05  9:51 ` [PATCH v3 06/10] pinctrl: cy8c95x0: Initialise boolean variable with boolean values Andy Shevchenko
2025-02-05  9:51 ` [PATCH v3 07/10] pinctrl: cy8c95x0: Get rid of cy8c95x0_pinmux_direction() forward declaration Andy Shevchenko
2025-02-05  9:51 ` [PATCH v3 08/10] pinctrl: cy8c95x0: Drop unneeded casting Andy Shevchenko
2025-02-05  9:51 ` [PATCH v3 09/10] pinctrl: cy8c95x0: Separate EEPROM related register definitios Andy Shevchenko
2025-02-05  9:51 ` [PATCH v3 10/10] pinctrl: cy8c95x0: Fix comment style Andy Shevchenko
2025-02-16 23:18 ` [PATCH v3 00/10] pinctrl: cy8c95x0: Clean up series Linus Walleij

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=20250205095243.512292-6-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patrick.rudolph@9elements.com \
    /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;
as well as URLs for NNTP newsgroup(s).