From b5eb509709de3e720c155ae55c7aef2271f217ac Mon Sep 17 00:00:00 2001 From: Ruediger Meier Date: Mon, 12 May 2014 01:43:03 +0200 Subject: tests: ts_device_init remove useless error handling Don't know why we should deinit the empty string. This patch prepares further refactoring or error handling. Signed-off-by: Ruediger Meier --- tests/functions.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'tests/functions.sh') 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 { -- cgit v1.2.3-55-g7522