From: Ruediger Meier Date: Sun, 11 May 2014 23:43:03 +0000 (+0200) Subject: tests: ts_device_init remove useless error handling X-Git-Tag: v2.25-rc1~154^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5eb509709de3e720c155ae55c7aef2271f217ac;p=thirdparty%2Futil-linux.git 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 --- diff --git a/tests/functions.sh b/tests/functions.sh index 1dc671d9eb..5b7324cfbf 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 {