From: Yu Watanabe Date: Wed, 26 Apr 2023 03:17:18 +0000 (+0900) Subject: udev/iocost: query_named_solution() provides non-NULL model and qos on success X-Git-Tag: v254-rc1~626^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b2fccd07293da8cabdbfea9638ac235a9e076757;p=thirdparty%2Fsystemd.git udev/iocost: query_named_solution() provides non-NULL model and qos on success --- 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"