Fix displaying of error messages for mising kernel features.
[platform/upstream/cryptsetup.git] / lib / tcrypt / tcrypt.c
index eb1e2da..239d3c7 100644 (file)
@@ -716,7 +716,7 @@ int TCRYPT_activate(struct crypt_device *cd,
                        break;
        }
 
-       if (!r && !(dm_flags() & DM_PLAIN64_SUPPORTED)) {
+       if (r < 0 && !(dm_flags() & DM_PLAIN64_SUPPORTED)) {
                log_err(cd, _("Kernel doesn't support plain64 IV.\n"));
                r = -ENOTSUP;
        }