summaryrefslogtreecommitdiff
path: root/src/cryptsetup/cryptsetup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptsetup/cryptsetup.c')
-rw-r--r--src/cryptsetup/cryptsetup.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
index 91c653312a..cefd1b85df 100644
--- a/src/cryptsetup/cryptsetup.c
+++ b/src/cryptsetup/cryptsetup.c
@@ -594,7 +594,7 @@ static int help(void) {
int main(int argc, char *argv[]) {
struct crypt_device *cd = NULL;
- int r = -EINVAL;
+ int r;
if (argc <= 1) {
r = help();
@@ -603,6 +603,7 @@ int main(int argc, char *argv[]) {
if (argc < 3) {
log_error("This program requires at least two arguments.");
+ r = -EINVAL;
goto finish;
}
@@ -749,6 +750,7 @@ int main(int argc, char *argv[]) {
} else {
log_error("Unknown verb %s.", argv[1]);
+ r = -EINVAL;
goto finish;
}