]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
ply-device-manager: Fix double-assignment of subsystem
authorHans de Goede <hdegoede@redhat.com>
Mon, 28 Feb 2022 15:17:53 +0000 (16:17 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 28 Feb 2022 15:28:41 +0000 (16:28 +0100)
The subsystem variable is also initialized with udev_device_get_subsystem ()
a couple of lines lower.

Remove the first initialization, so that udev_device_get_subsystem ()
does not get called unnecessary when the function exits early because
of the action value.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
src/libply-splash-core/ply-device-manager.c

index aed7bac2f5557c224fa9ad2dbb34a97cf967da50..09fbb6ed462ab418a6698e36e13974cd08339a18 100644 (file)
@@ -411,7 +411,7 @@ verify_add_or_change (ply_device_manager_t *manager,
                       const char           *device_path,
                       struct udev_device   *device)
 {
-        const char *subsystem = udev_device_get_subsystem (device);
+        const char *subsystem;
 
         if (strcmp (action, "add") && strcmp (action, "change"))
                 return false;