meta-quanta: fix shellcheck issues

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I189baf142cc86d44ebbf615edd3bb0ec1785be8d
diff --git a/meta-quanta/meta-gbs/recipes-google/acpi-power-state/acpi-power-state-daemon/gbs-set-failsafe.sh b/meta-quanta/meta-gbs/recipes-google/acpi-power-state/acpi-power-state-daemon/gbs-set-failsafe.sh
index bcd1d2c..8d6f774 100644
--- a/meta-quanta/meta-gbs/recipes-google/acpi-power-state/acpi-power-state-daemon/gbs-set-failsafe.sh
+++ b/meta-quanta/meta-gbs/recipes-google/acpi-power-state/acpi-power-state-daemon/gbs-set-failsafe.sh
@@ -22,10 +22,10 @@
   exit 1
 fi
 
-zone_num="$(busctl tree xyz.openbmc_project.State.FanCtrl | grep zone | wc -l)"
+zone_num="$(busctl tree xyz.openbmc_project.State.FanCtrl | grep -c zone)"
 result=0
 
-for (( i = 0; i < ${zone_num}; i++ )); do
+for (( i = 0; i < zone_num; i++ )); do
   retries=4
   busctl_error=-1
 
@@ -39,7 +39,7 @@
       sleep 1
     fi
 
-    let retries-=1
+    (( retries-=1 )) || true
   done
 
   if (( busctl_error != 0 )); then