From b2fccd07293da8cabdbfea9638ac235a9e076757 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 26 Apr 2023 12:17:18 +0900 Subject: [PATCH] udev/iocost: query_named_solution() provides non-NULL model and qos on success --- src/udev/iocost/iocost.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/udev/iocost/iocost.c b/src/udev/iocost/iocost.c index 9737cf6af70..804d11ca171 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" -- 2.47.3