summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2022-02-28 16:20:43 +0100
committerHans de Goede <hdegoede@redhat.com>2022-02-28 16:28:41 +0100
commit083763e9e5a3057d9b2e625b736e66ce3f109785 (patch)
treef445a484382f74e5ab68ac577cefdb51471cc88c
parentda821831d69513998c92d09341cef314c1a36354 (diff)
ply-device-manager: Remove unnecessary subsystem != NULL check
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>
-rw-r--r--src/libply-splash-core/ply-device-manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libply-splash-core/ply-device-manager.c b/src/libply-splash-core/ply-device-manager.c
index 09fbb6ed..bb548ef8 100644
--- a/src/libply-splash-core/ply-device-manager.c
+++ b/src/libply-splash-core/ply-device-manager.c
@@ -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) {