]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
ply-device-manager: Remove unnecessary subsystem != NULL check
authorHans de Goede <hdegoede@redhat.com>
Mon, 28 Feb 2022 15:20:43 +0000 (16:20 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 28 Feb 2022 15:28:41 +0000 (16:28 +0100)
The ply-device-manager.c already assumes that the return value of
udev_device_get_subsystem () is never NULL in many places, including
in the condition of the "else if" just below the check which is
being removed.

Remove the one lonely check for it being NULL for consistency.

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

index 09fbb6ed462ab418a6698e36e13974cd08339a18..bb548ef86a09d818c702012b99c5478e2af15306 100644 (file)
@@ -279,7 +279,7 @@ create_devices_for_udev_device (ply_device_manager_t *manager,
                 subsystem = udev_device_get_subsystem (device);
                 ply_trace ("device subsystem is %s", subsystem);
 
-                if (subsystem != NULL && strcmp (subsystem, SUBSYSTEM_DRM) == 0) {
+                if (strcmp (subsystem, SUBSYSTEM_DRM) == 0) {
                         ply_trace ("found DRM device %s", device_path);
                         renderer_type = PLY_RENDERER_TYPE_DRM;
                 } else if (strcmp (subsystem, SUBSYSTEM_FRAME_BUFFER) == 0) {