The else block is unnecessary and we can simply clarify the if condition
to remove the else clause. It is more readable.

Signed-off-by: Joel Fernandes (Google) <j...@joelfernandes.org>
---
 tools/testing/selftests/rcutorture/bin/kvm.sh | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh 
b/tools/testing/selftests/rcutorture/bin/kvm.sh
index 42e5e8597a1a..4766c3023fed 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -275,10 +275,7 @@ do
        shift
 done
 
-if test -n "$dryrun" || test -z "$TORTURE_INITRD" || 
tools/testing/selftests/rcutorture/bin/mkinitrd.sh
-then
-       :
-else
+if test -z "$dryrun" && test -n "$TORTURE_INITRD" && 
!tools/testing/selftests/rcutorture/bin/mkinitrd.sh
        echo No initrd and unable to create one, aborting test >&2
        exit 1
 fi
-- 
2.34.1


Reply via email to