mirror of https://github.com/nirenjan/libx52.git
x52test: Cleanup if successful or cancelled
Commit be1f7e0
fixed the error handling, but missed this line. The
original behavior was to restore the X52 LED and MFD state after
completing all the tests, or if the user cancelled the tests using
Ctrl-C.
This commit fixes that regression, so that it will preserve the state
only if it encountered an error during the test, not if it was
cancelled.
pull/22/head
parent
a16b1822aa
commit
e7d14d7b53
|
@ -147,7 +147,7 @@ static int run_tests(int test_set)
|
|||
fprintf(stderr, _("Received %s signal, quitting...\n"), strsignal(-rc));
|
||||
}
|
||||
|
||||
if (rc >= 0) test_cleanup();
|
||||
if (rc <= 0) test_cleanup();
|
||||
libx52_exit(dev);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue