summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp')
-rw-r--r--src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp b/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp
index f285e61a9f..334eb51a86 100644
--- a/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp
+++ b/src/platformsupport/devicediscovery/qdevicediscovery_udev.cpp
@@ -185,11 +185,11 @@ void QDeviceDiscoveryUDev::handleUDevNotification()
// if we cannot determine a type, walk up the device tree
if (!checkDeviceType(dev)) {
// does not increase the refcount
- dev = udev_device_get_parent_with_subsystem_devtype(dev, subsystem, 0);
- if (!dev)
+ struct udev_device *parent_dev = udev_device_get_parent_with_subsystem_devtype(dev, subsystem, 0);
+ if (!parent_dev)
goto cleanup;
- if (!checkDeviceType(dev))
+ if (!checkDeviceType(parent_dev))
goto cleanup;
}