ci/intel-gpu-freq: Fix shellcheck warning

SC2319 is actually helpful! It's telling us that in:
    foo="$(bar)"
    [ -n "$foo" ] && ret=$?
ret actually gets us the return code from [ which is by definition zero,
instead of the return code from bar that we wanted.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30978>
This commit is contained in:
Daniel Stone
2024-09-09 14:28:05 +01:00
committed by Marge Bot
parent 37c22dd403
commit b943f42ef5

View File

@@ -560,7 +560,8 @@ set_cpu_freq_max() {
read_cpu_freq_info ${cpu_index} n ${CAP_CPU_FREQ_INFO} || { res=$?; continue; }
target_freq=$(compute_cpu_freq_set "${CPU_SET_MAX_FREQ}")
[ -z "${target_freq}" ] && { res=$?; continue; }
tf_res=$?
[ -z "${target_freq}" ] && { res=$tf_res; continue; }
log INFO "Setting CPU%s max scaling freq to %s Hz" ${cpu_index} "${target_freq}"
[ -n "${DRY_RUN}" ] && continue