From: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
To: zohar@linux.ibm.com, dmitry.kasatkin@gmail.com,
jmorris@namei.org, serge@hallyn.com,
zhangliguang@linux.alibaba.com, zhang.jia@linux.alibaba.com
Cc: linux-integrity@vger.kernel.org,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org, tianjia.zhang@linux.alibaba.com
Subject: [PATCH 1/2] ima: simplify function ima_store_template
Date: Tue, 14 Apr 2020 19:48:49 +0800 [thread overview]
Message-ID: <20200414114850.98622-2-tianjia.zhang@linux.alibaba.com> (raw)
In-Reply-To: <20200414114850.98622-1-tianjia.zhang@linux.alibaba.com>
The 'result' here is not necessary, remove redundant code,
the code is more concise.
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
---
security/integrity/ima/ima_api.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/security/integrity/ima/ima_api.c b/security/integrity/ima/ima_api.c
index f6bc00914aa5..9121257c9dc6 100644
--- a/security/integrity/ima/ima_api.c
+++ b/security/integrity/ima/ima_api.c
@@ -118,8 +118,7 @@ int ima_store_template(struct ima_template_entry *entry,
memcpy(entry->digest, hash.hdr.digest, hash.hdr.length);
}
entry->pcr = pcr;
- result = ima_add_template_entry(entry, violation, op, inode, filename);
- return result;
+ return ima_add_template_entry(entry, violation, op, inode, filename);
}
/*
--
2.17.1
next prev parent reply other threads:[~2020-04-14 11:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-14 11:48 [PATCH 0/2] Simplify the implementation of some functions in IMA Tianjia Zhang
2020-04-14 11:48 ` Tianjia Zhang [this message]
2020-04-14 15:17 ` [PATCH 1/2] ima: simplify function ima_store_template Lakshmi Ramasubramanian
2020-04-14 11:48 ` [PATCH 2/2] ima: simplify function process_buffer_measurement Tianjia Zhang
2020-04-14 15:18 ` Lakshmi Ramasubramanian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200414114850.98622-2-tianjia.zhang@linux.alibaba.com \
--to=tianjia.zhang@linux.alibaba.com \
--cc=dmitry.kasatkin@gmail.com \
--cc=jmorris@namei.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=serge@hallyn.com \
--cc=zhang.jia@linux.alibaba.com \
--cc=zhangliguang@linux.alibaba.com \
--cc=zohar@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).