mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gerhard Engleder <gerhard@engleder-embedded.com>
To: linux-kernel@vger.kernel.org
Cc: arnd@arndb.de, gregkh@linuxfoundation.org,
	Gerhard Engleder <gerhard@engleder-embedded.com>,
	Gerhard Engleder <eg@keba.com>
Subject: [PATCH v2 1/8] misc: keba: Use variable ret for return values
Date: Fri, 11 Oct 2024 21:12:50 +0200	[thread overview]
Message-ID: <20241011191257.19702-2-gerhard@engleder-embedded.com> (raw)
In-Reply-To: <20241011191257.19702-1-gerhard@engleder-embedded.com>

From: Gerhard Engleder <eg@keba.com>

One function of the cp500 driver uses the variable name retval for
return values but all others use the variable name ret. Use ret for
return values in all functions.

Signed-off-by: Gerhard Engleder <eg@keba.com>
---
 drivers/misc/keba/cp500.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/misc/keba/cp500.c b/drivers/misc/keba/cp500.c
index ae0922817881..b5327feb2847 100644
--- a/drivers/misc/keba/cp500.c
+++ b/drivers/misc/keba/cp500.c
@@ -229,7 +229,7 @@ static void cp500_i2c_release(struct device *dev)
 
 static int cp500_register_i2c(struct cp500 *cp500)
 {
-	int retval;
+	int ret;
 
 	cp500->i2c = kzalloc(sizeof(*cp500->i2c), GFP_KERNEL);
 	if (!cp500->i2c)
@@ -251,19 +251,19 @@ static int cp500_register_i2c(struct cp500 *cp500)
 	cp500->i2c->info_size = ARRAY_SIZE(cp500_i2c_info);
 	cp500->i2c->info = cp500_i2c_info;
 
-	retval = auxiliary_device_init(&cp500->i2c->auxdev);
-	if (retval) {
+	ret = auxiliary_device_init(&cp500->i2c->auxdev);
+	if (ret) {
 		kfree(cp500->i2c);
 		cp500->i2c = NULL;
 
-		return retval;
+		return ret;
 	}
-	retval = __auxiliary_device_add(&cp500->i2c->auxdev, "keba");
-	if (retval) {
+	ret = __auxiliary_device_add(&cp500->i2c->auxdev, "keba");
+	if (ret) {
 		auxiliary_device_uninit(&cp500->i2c->auxdev);
 		cp500->i2c = NULL;
 
-		return retval;
+		return ret;
 	}
 
 	return 0;
-- 
2.39.2


  reply	other threads:[~2024-10-11 19:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-11 19:12 [PATCH v2 0/8] misc: keba: Add support for additional devices Gerhard Engleder
2024-10-11 19:12 ` Gerhard Engleder [this message]
2024-10-11 19:12 ` [PATCH v2 2/8] misc: keba: Use capital letters for I2C error message Gerhard Engleder
2024-10-11 19:12 ` [PATCH v2 3/8] misc: keba: Add SPI controller device Gerhard Engleder
2024-10-11 19:12 ` [PATCH v2 4/8] misc: keba: Add LAN9252 driver Gerhard Engleder
2024-10-11 19:12 ` [PATCH v2 5/8] misc: keba: Support EEPROM sections as separate devices Gerhard Engleder
2024-10-11 19:12 ` [PATCH v2 6/8] misc: keba: Add fan device Gerhard Engleder
2024-10-11 19:12 ` [PATCH v2 7/8] misc: keba: Add battery device Gerhard Engleder
2024-10-11 19:12 ` [PATCH v2 8/8] misc: keba: Add UART devices Gerhard Engleder
2024-10-12  7:26 ` [PATCH v2 0/8] misc: keba: Add support for additional devices Greg KH

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=20241011191257.19702-2-gerhard@engleder-embedded.com \
    --to=gerhard@engleder-embedded.com \
    --cc=arnd@arndb.de \
    --cc=eg@keba.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®