thermal: skip if there are no cooling devices

Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
diff --git a/include/thermal_functions.sh b/include/thermal_functions.sh
index 1f1991f..0c836c5 100644
--- a/include/thermal_functions.sh
+++ b/include/thermal_functions.sh
@@ -163,6 +163,10 @@
     shift 1
 
     devices=$(ls $THERMAL_PATH | grep "cooling_device['$MAX_CDEV']")
+    if [ "$devices" == "" ]; then
+	log_skip "no cooling devices"
+	return 0
+    fi
 
     ALL_DEVICE=$devices
     for device in $devices; do