mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shreenidhi Shedi <yesshedi@gmail.com>
To: arnd@arndb.de, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, yesshedi@gmail.com,
	Shreenidhi Shedi <sshedi@vmware.com>
Subject: [PATCH 2/3] char: lp: remove redundant initialization of err
Date: Sun, 15 May 2022 13:24:54 +0530	[thread overview]
Message-ID: <20220515075455.306082-2-sshedi@vmware.com> (raw)
In-Reply-To: <20220515075455.306082-1-sshedi@vmware.com>

err is getting assigned with an appropriate value before returning,
hence this initialization is unnecessary.

Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
---
 drivers/char/lp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index e61060f3c..5e8bd8d6c 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -1018,7 +1018,7 @@ static struct parport_driver lp_driver = {
 
 static int __init lp_init(void)
 {
-	int i, err = 0;
+	int i, err;
 
 	if (parport_nr[0] == LP_PARPORT_OFF)
 		return 0;
-- 
2.36.1


  reply	other threads:[~2022-05-15  7:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-15  7:54 [PATCH 1/3] char: lp: ensure that index has not exceeded LP_NO Shreenidhi Shedi
2022-05-15  7:54 ` Shreenidhi Shedi [this message]
2022-05-15  8:08   ` [PATCH 2/3] char: lp: remove redundant initialization of err Greg KH
2022-05-15  7:54 ` [PATCH 3/3] char: lp: fix most of checkspec.pl warnings & errors Shreenidhi Shedi
2022-05-15  8:08   ` Greg KH
2022-05-15  8:07 ` [PATCH 1/3] char: lp: ensure that index has not exceeded LP_NO Greg KH
2022-06-03 11:57 ` Shreenidhi Shedi
2022-06-03 12:02   ` Shreenidhi Shedi
2022-06-03 12:44     ` Greg KH
2022-06-03 12:49       ` Shreenidhi Shedi

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=20220515075455.306082-2-sshedi@vmware.com \
    --to=yesshedi@gmail.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sshedi@vmware.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

all inboxes | Powered by JetHome®