summaryrefslogtreecommitdiffstats
path: root/tests/functions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functions.sh')
-rw-r--r--tests/functions.sh11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/functions.sh b/tests/functions.sh
index 1dc671d9e..5b7324cfb 100644
--- a/tests/functions.sh
+++ b/tests/functions.sh
@@ -428,16 +428,13 @@ function ts_image_init {
}
function ts_device_init {
- local img=$(ts_image_init $1 $2)
- local dev=$($TS_CMD_LOSETUP --show -f "$img")
+ local img
+ local dev
- if [ -z "$dev" ]; then
- ts_device_deinit $dev
- return 1 # error
- fi
+ img=$(ts_image_init $1 $2)
+ dev=$($TS_CMD_LOSETUP --show -f "$img")
echo $dev
- return 0 # succes
}
function ts_device_deinit {