diff mbox series

rt-tests: cyclicdeadline.c: Remove dead code

Message ID 20210303210942.15847-1-jkacur@redhat.com
State New
Headers show
Series rt-tests: cyclicdeadline.c: Remove dead code | expand

Commit Message

John Kacur March 3, 2021, 9:09 p.m. UTC
In cyclicdeadline there is some unreachable code that was there from the
beginning. By inspection it looks like this change was the original
intention.

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 src/sched_deadline/cyclicdeadline.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/src/sched_deadline/cyclicdeadline.c b/src/sched_deadline/cyclicdeadline.c
index ed3c960d9916..33bac8cda898 100644
--- a/src/sched_deadline/cyclicdeadline.c
+++ b/src/sched_deadline/cyclicdeadline.c
@@ -560,13 +560,11 @@  static void destroy_cpuset(const char *name, int print)
 	sleep(1);
 	ret = rmdir(path);
 	if (ret < 0) {
-		if (retry++ < 5)
-			goto again;
-		err_msg_n(errno, "Failed to remove %s\n", path);
 		if (retry++ < 5) {
 			err_msg("Trying again\n");
 			goto again;
 		}
+		err_msg_n(errno, "Failed to remove %s\n", path);
 	}
 }