There are no cleanup actions to take in test_dax_remap(), and it is already
inconsistent for having a single return point, so remove the out label.

Signed-off-by: Dan Williams <[email protected]>
---
 test/dax-pmd.c |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/test/dax-pmd.c b/test/dax-pmd.c
index 401826d02d69..b1251db63041 100644
--- a/test/dax-pmd.c
+++ b/test/dax-pmd.c
@@ -83,20 +83,18 @@ int test_dax_remap(struct ndctl_test *test, int dax_fd, 
unsigned long align, voi
        act.sa_flags = SA_SIGINFO;
        if (sigaction(SIGBUS, &act, 0)) {
                perror("sigaction");
-               rc = EXIT_FAILURE;
-               goto out;
+               return EXIT_FAILURE;
        }
 
        /* test fault after device-dax instance disabled */
        if (sigsetjmp(sj_env, 1)) {
                if (!fsdax && align > SZ_4K) {
                        fprintf(stderr, "got expected SIGBUS after mremap() of 
device-dax\n");
-                       rc = 0;
+                       return 0;
                } else {
                        fprintf(stderr, "unpexpected SIGBUS after mremap()\n");
-                       rc = -EIO;
+                       return -EIO;
                }
-               goto out;
        }
 
        *(int *) anon = 0xAA;
@@ -107,9 +105,7 @@ int test_dax_remap(struct ndctl_test *test, int dax_fd, 
unsigned long align, voi
                return -ENXIO;
        }
 
-       rc = 0;
-out:
-       return rc;
+       return 0;
 }
 
 int test_dax_directio(int dax_fd, unsigned long align, void *dax_addr, off_t 
offset)
_______________________________________________
Linux-nvdimm mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to