fscrypt: remove redundant assignment of res
authorColin Ian King <colin.king@canonical.com>
Tue, 10 Jan 2017 16:57:32 +0000 (16:57 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 7 Feb 2017 04:25:53 +0000 (23:25 -0500)
res is assigned to sizeof(ctx), however, this is unused and res
is updated later on without that assigned value to res ever being
used.  Remove this redundant assignment.

Fixes CoverityScan CID#1395546 "Unused value"

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/crypto/keyinfo.c

index eeb6fd67ea17faafc2a8d97dc910c374f62204bf..02eb6b9e44387d90daf6a35c03a052e7b855715d 100644 (file)
@@ -211,7 +211,6 @@ retry:
                ctx.contents_encryption_mode = FS_ENCRYPTION_MODE_AES_256_XTS;
                ctx.filenames_encryption_mode = FS_ENCRYPTION_MODE_AES_256_CTS;
                memset(ctx.master_key_descriptor, 0x42, FS_KEY_DESCRIPTOR_SIZE);
-               res = sizeof(ctx);
        } else if (res != sizeof(ctx)) {
                return -EINVAL;
        }