Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp581081ybz; Wed, 15 Apr 2020 14:29:24 -0700 (PDT) X-Google-Smtp-Source: APiQypJxOJnPP8Rq4sXzs9/224/JQrvFXQ/c+H4jmJthWnGHWsPVMM3cksgJ7U8F1Ub1menMs63T X-Received: by 2002:aa7:c910:: with SMTP id b16mr27967196edt.13.1586986164465; Wed, 15 Apr 2020 14:29:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586986164; cv=none; d=google.com; s=arc-20160816; b=nvcduQ/dRh0sY5Bdh+UEz+qAUEHqx4H4jSR6V9xT/uGrjTd9tys5Br9Jv6bVgQEblK LCwUGMXTFY/MSoOZCCz79H605nlHRsyxi0YroI+lDYoWegR5IqV9lVkr6wUycZwOvzUm DCb3OzLsgrZoodfuzFuQ1xXblvANNzp4hW5iPGrV8d63SU2ONyqJI7aRrw2pYeprs5j/ SgwpPhQZkzAtU5os81K2h6yRFSolR3qxW/xYbIey6/e+kIOoWMYQblSYvOJ6TVazS09l UMb0dkVkmhADolE3DV7sKOHd201b2G3Pufdr2UTiXU7UyA3plGxxc7Zd/sJl7gRPgBVm 0rdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=PM3cyn3PaC/SgfXwR9/ES6McbLtKaeMIEBabVVZe6SM=; b=ESu6njwIQMUnlGjo0N3Fgorc9UPMoB2byM7raxh1YE2Bp9zlYyLulevMiqk4TzTtuq SOAQiWeLbLrLpUO7va3cTtuk1KGt/g2Kv77tlMWSnGHGWgIZ6gRrFabCQSjTVQfZ7bSJ H15i1DjWr3GGjNLFHzARyqDn/SY3Li7ZaXE0yJUQ7yfpn+5J2O0vM665V/rh1EvH7rwi 0EezRctgOYDsPt80hzxuQApFuhabyKBT5D8OXqKQuns6YugJGt7TKLabIb3tYbvopFfy 9wPNhGAu2uyJEy3yoYU5btx4MwlQd1WcV5l4Qs92S03F7tBTCN/eb3Er7mH0FJAYg793 yMTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 3si11208816ejz.2.2020.04.15.14.29.00; Wed, 15 Apr 2020 14:29:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439620AbgDNLta (ORCPT + 99 others); Tue, 14 Apr 2020 07:49:30 -0400 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:49953 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729470AbgDNLtP (ORCPT ); Tue, 14 Apr 2020 07:49:15 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R211e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01419;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0TvX41bQ_1586864931; Received: from localhost(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0TvX41bQ_1586864931) by smtp.aliyun-inc.com(127.0.0.1); Tue, 14 Apr 2020 19:48:52 +0800 From: Tianjia Zhang 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 Message-Id: <20200414114850.98622-2-tianjia.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200414114850.98622-1-tianjia.zhang@linux.alibaba.com> References: <20200414114850.98622-1-tianjia.zhang@linux.alibaba.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The 'result' here is not necessary, remove redundant code, the code is more concise. Signed-off-by: Tianjia Zhang --- 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