aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanjay Singh Rawat <sanjay.rawat@linaro.org>2014-07-07 16:47:12 +0200
committerSanjay Singh Rawat <sanjay.rawat@linaro.org>2014-07-07 16:47:12 +0200
commit15bcbd50aa28911cd73c665392697f819408c3a8 (patch)
treebc089b2484536495db542ba5b8702bd8ce543b25
parente232318568c550f6d1a5f435e93de156985746bf (diff)
thermal: skip if there are no cooling devices
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
-rw-r--r--include/thermal_functions.sh4
1 files changed, 4 insertions, 0 deletions
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 @@ for_each_cooling_device() {
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