]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev/iocost: query_named_solution() provides non-NULL model and qos on success
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 26 Apr 2023 03:17:18 +0000 (12:17 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 26 Apr 2023 05:50:25 +0000 (14:50 +0900)
src/udev/iocost/iocost.c

index 9737cf6af706542732a6e5530c2ffecddab033be..804d11ca171c4402cdb07a2525488a789320a3c7 100644 (file)
@@ -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"