diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-05-27 15:28:14 +0200 |
---|---|---|
committer | Tyler Hicks <tyhicks@canonical.com> | 2019-06-19 07:53:44 +0200 |
commit | 29a51df0609c74e7163d41334021166d6a34d083 (patch) | |
tree | fcc9de67d914998f5d52ebb7deba78f528290b5d /fs | |
parent | ecryptfs: use print_hex_dump_bytes for hexdump (diff) | |
download | linux-29a51df0609c74e7163d41334021166d6a34d083.tar.xz linux-29a51df0609c74e7163d41334021166d6a34d083.zip |
ecryptfs: remove unnessesary null check in ecryptfs_keyring_auth_tok_for_sig
request_key and ecryptfs_get_encrypted_key never
return a NULL pointer, so no need do a null check.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ecryptfs/keystore.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c index 624ff4409c61..770cb8f6f697 100644 --- a/fs/ecryptfs/keystore.c +++ b/fs/ecryptfs/keystore.c @@ -1627,9 +1627,9 @@ int ecryptfs_keyring_auth_tok_for_sig(struct key **auth_tok_key, int rc = 0; (*auth_tok_key) = request_key(&key_type_user, sig, NULL); - if (!(*auth_tok_key) || IS_ERR(*auth_tok_key)) { + if (IS_ERR(*auth_tok_key)) { (*auth_tok_key) = ecryptfs_get_encrypted_key(sig); - if (!(*auth_tok_key) || IS_ERR(*auth_tok_key)) { + if (IS_ERR(*auth_tok_key)) { printk(KERN_ERR "Could not find key with description: [%s]\n", sig); rc = process_request_key_err(PTR_ERR(*auth_tok_key)); |