udev-node: make link_find_prioritized() return negative value when nothing found
Fixes a bug introduced by a2554acec6
.
Fixes RHBZ#1662303.
This commit is contained in:
parent
c501ecd70c
commit
82d9ac23fd
|
@ -181,6 +181,9 @@ static int link_find_prioritized(sd_device *dev, bool add, const char *stackdir,
|
|||
priority = db_prio;
|
||||
}
|
||||
|
||||
if (!target)
|
||||
return -ENOENT;
|
||||
|
||||
*ret = TAKE_PTR(target);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue