Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1555702 > unrolled thread

[PATCH] fscrypt: remove redundant assignment of res

Started byColin King <colin.king@canonical.com>
First post2017-01-10 18:00 +0100
Last post2017-01-10 18:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] fscrypt: remove redundant assignment of res Colin King <colin.king@canonical.com> - 2017-01-10 18:00 +0100

#1555702 — [PATCH] fscrypt: remove redundant assignment of res

FromColin King <colin.king@canonical.com>
Date2017-01-10 18:00 +0100
Subject[PATCH] fscrypt: remove redundant assignment of res
Message-ID<sY7W9-3M3-5@gated-at.bofh.it>
From: Colin Ian King <colin.king@canonical.com>

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>
---
 fs/crypto/keyinfo.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/crypto/keyinfo.c b/fs/crypto/keyinfo.c
index eeb6fd67..02eb6b9 100644
--- a/fs/crypto/keyinfo.c
+++ b/fs/crypto/keyinfo.c
@@ -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;
 	}
-- 
2.10.2

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web