[3/3] kobject: Delete an unnecessary variable initialisation in kobject_uevent_env()

Message ID 526df884-8d9f-4fe1-8a32-c98dfff261d7@web.de
State New
Headers
Series kobject: Adjustments for kobject_uevent_env() |

Commit Message

Markus Elfring Dec. 19, 2023, 3:36 p.m. UTC
  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(-)

--
2.43.0
  

Patch

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;