/* Graphics card */
if (class == 0x30000) {
- *ret = TAKE_PTR(parent);
+ *ret = parent;
return 0;
}
} else if (streq(subsystem, "platform")) {
- *ret = TAKE_PTR(parent);
+ *ret = parent;
return 0;
}
static int validate_device(sd_device *device) {
_cleanup_(sd_device_enumerator_unrefp) sd_device_enumerator *enumerate = NULL;
- _cleanup_(sd_device_unrefp) sd_device *parent = NULL;
const char *v, *subsystem;
- sd_device *other;
+ sd_device *parent, *other;
int r;
assert(device);
return r;
FOREACH_DEVICE_AND_SUBSYSTEM(enumerate, other) {
- _cleanup_(sd_device_unrefp) sd_device *other_parent = NULL;
const char *other_subsystem;
+ sd_device *other_parent;
if (same_device(device, other) > 0)
continue;