提交 92859a5e 编写于 作者: M Markus Elfring 提交者: Jaegeuk Kim

f2fs crypto: delete an unnecessary check before the function call "key_put"

The key_put() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.
Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
上级 6c84461c
......@@ -92,8 +92,7 @@ static void f2fs_free_crypt_info(struct f2fs_crypt_info *ci)
if (!ci)
return;
if (ci->ci_keyring_key)
key_put(ci->ci_keyring_key);
key_put(ci->ci_keyring_key);
crypto_free_ablkcipher(ci->ci_ctfm);
kmem_cache_free(f2fs_crypt_info_cachep, ci);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册