Skip to content

Commit

Permalink
fscrypt: remove redundant assignment of res
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Colin Ian King authored and Theodore Ts'o committed Feb 7, 2017
1 parent a5d431e commit 02680b3
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/crypto/keyinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ int fscrypt_get_crypt_info(struct inode *inode)
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;
}
Expand Down

0 comments on commit 02680b3

Please sign in to comment.