summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-04-26 12:17:18 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-04-26 14:50:25 +0900
commitb2fccd07293da8cabdbfea9638ac235a9e076757 (patch)
tree330d6d1031fed22f8f29954c458be691f3d167d2 /src/udev
parent934613bb88054cd5e548bd77dfad6cea73b618ad (diff)
downloadsystemd-b2fccd07293da8cabdbfea9638ac235a9e076757.tar.gz
udev/iocost: query_named_solution() provides non-NULL model and qos on success
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/iocost/iocost.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/udev/iocost/iocost.c b/src/udev/iocost/iocost.c
index 9737cf6af7..804d11ca17 100644
--- a/src/udev/iocost/iocost.c
+++ b/src/udev/iocost/iocost.c
@@ -275,8 +275,7 @@ static int query_solutions_for_path(const char *path) {
STRV_FOREACH(s, solutions) {
const char *model, *qos;
- r = query_named_solution(device, *s, &model, &qos);
- if (r < 0 || !model || !qos)
+ if (query_named_solution(device, *s, &model, &qos) < 0)
continue;
log_info("%s: io.cost.qos: %s\n"