[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <526df884-8d9f-4fe1-8a32-c98dfff261d7@web.de>
Date: Tue, 19 Dec 2023 16:36:11 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: kernel-janitors@...r.kernel.org, Andrew Morton
<akpm@...ux-foundation.org>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, "Rafael J. Wysocki" <rafael@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, cocci@...ia.fr
Subject: [PATCH 3/3] kobject: Delete an unnecessary variable initialisation in
kobject_uevent_env()
From: Markus Elfring <elfring@...rs.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@...rs.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
Powered by blists - more mailing lists