public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: kernel-janitors@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, cocci@inria.fr
Subject: [PATCH 3/3] kobject: Delete an unnecessary variable initialisation in kobject_uevent_env()
Date: Tue, 19 Dec 2023 16:36:11 +0100	[thread overview]
Message-ID: <526df884-8d9f-4fe1-8a32-c98dfff261d7@web.de> (raw)
In-Reply-To: <e0543d9d-a02a-4c9c-b341-36771cfb5353@web.de>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 19 Dec 2023 16:03:39 +0100

The local variable “devpath” will eventually be set to an appropriate
pointer a bit later.
Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 lib/kobject_uevent.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index a9b1bc02f65c..1b7b42dc160c 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -459,7 +459,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
 {
 	struct kobj_uevent_env *env;
 	const char *action_string = kobject_actions[action];
-	const char *devpath = NULL;
+	const char *devpath;
 	const char *subsystem;
 	struct kobject *top_kobj;
 	struct kset *kset;
--
2.43.0


      parent reply	other threads:[~2023-12-19 15:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-19 15:30 [PATCH 0/3] kobject: Adjustments for kobject_uevent_env() Markus Elfring
2023-12-19 15:32 ` [PATCH 1/3] kobject: Add a jump label in kobject_uevent_env() Markus Elfring
2023-12-19 15:34 ` [PATCH 2/3] kobject: Improve a size determination " Markus Elfring
2023-12-19 15:40   ` Greg Kroah-Hartman
2023-12-19 15:36 ` Markus Elfring [this message]

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=526df884-8d9f-4fe1-8a32-c98dfff261d7@web.de \
    --to=markus.elfring@web.de \
    --cc=akpm@linux-foundation.org \
    --cc=cocci@inria.fr \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@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