linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fscrypt: remove redundant assignment of res
@ 2017-01-10 16:57 Colin King
  2017-02-07  4:26 ` Theodore Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-01-10 16:57 UTC (permalink / raw)
  To: Theodore Y . Ts'o, Jaegeuk Kim, linux-fsdevel; +Cc: linux-kernel

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-07  4:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-10 16:57 [PATCH] fscrypt: remove redundant assignment of res Colin King
2017-02-07  4:26 ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).