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:
Yu Watanabe
2019-01-08 19:21:44 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent c501ecd70c
commit 82d9ac23fd
+3
View File
@@ -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;
}