Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp202582pxj; Thu, 10 Jun 2021 19:31:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSf/0Tztf9EGz5BnmcMCIIbXxMkVUkJZGI7cWaUtJ5Rmed5qLtMcoolQbS4LI4J0kZ2GR9 X-Received: by 2002:a17:906:9512:: with SMTP id u18mr1353743ejx.61.1623378685875; Thu, 10 Jun 2021 19:31:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623378685; cv=none; d=google.com; s=arc-20160816; b=hbPmCd0tr3Gjy+Y/nMp/awRIb2A36YH8MpPyBM/tWiXNMnJKZGZaBuaM5WfB/AJvOm JXLn4Qc3MQu8l5szICBZkgSO7rI1Q7uOrHtuLZ80LJVXZGI9F7Ae2zEZZEKLg/9kW3kx bjXSLlBeLgGA9/5Q8DvRML6tW50YK2hK8bsEB+1tgWsTafFlCPhUbXU92+Na9Q2G6BNq pWmPBz1FB1QoC1Lqv930yEx8KdXjDTT/RD3fre3x2GIOD0FH7WrNWGBDDKC1qAhCjnDk sftdgwAycX3SX94Qn8UgcYkmIwgvtm+Fp/ql+qT+LijpS74UR4J8zDLUOo5mtx6rvHmp e0XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=AKU124jU/u06/XqITKyhGdyjgwHpz1y19GKnJe70/50=; b=ldhauUh4qoCD3/dOI3lazK0FsVRGEUN1D5VuknGp/JgQS++Yj5puUURQwU3x7ygwqa 3RI783lnuvGUgIsjnpxIrPbv+vPSMH4ooAeGcF1lm/sebkySFZPsqEy4QQhXA11oJMFS /goFl5gtQndxUdqpKUNyuzuuGwb7imHsa88R9k8Ir3BEOfPbKOQC5WZzK8igb2VI0K6s YNUgqmODmcu3/YfqGlQ8cpWwKsHbolfxREUQjiuMRlMaGSZ7m4oXc156rP83WyKee9mh FnZTuioaonfY/OxMuZ6WRmhubhbupPWie+DfI65AY/rh0K/K2wWP4GqS+TYnGYwM2j+/ uBGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Fzd+9ay/"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m6si3718596ejl.712.2021.06.10.19.31.02; Thu, 10 Jun 2021 19:31:25 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Fzd+9ay/"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231284AbhFKCbr (ORCPT + 99 others); Thu, 10 Jun 2021 22:31:47 -0400 Received: from mail-pf1-f173.google.com ([209.85.210.173]:45718 "EHLO mail-pf1-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230160AbhFKCbq (ORCPT ); Thu, 10 Jun 2021 22:31:46 -0400 Received: by mail-pf1-f173.google.com with SMTP id d16so3190642pfn.12; Thu, 10 Jun 2021 19:29:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=AKU124jU/u06/XqITKyhGdyjgwHpz1y19GKnJe70/50=; b=Fzd+9ay/my62ld1LfHLOT9s0mdEJYwyL+xSYOozDWoaFF7N6NIzgDH6+61AlORTrn4 cchKq8nuZnE9/bCSK7zUZoic4PBVaRbx6y7aD+tULv8JiYfqOb942D1ZCHQ6a4TnH3wX 3KfMkkEQ2Pp+whm7/Q5ImzqXw2Hk75/BYZj4r08Xm7AvlofuEB+oVuOaR/pl1PBoHA6m ZcVRlwR1Swmn+pC2zTxPHE6oy+vaobauFcbnxSHzwlYaULUPv9M78sKvvzVvs1itCxNG 1MqTyhOFQoJ6+hdJDAxCPJM+Jg4uqbksTx3W/TUcc7VmRvAgJVEN0na2WJm/nKjVz6F4 j9SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=AKU124jU/u06/XqITKyhGdyjgwHpz1y19GKnJe70/50=; b=oykq0BmBkt8cwQDjB283bIfuKWlCsCFcqikn9H9KWpz+c94XBoZ+4AJIGAEBy246NG bvx5HGZNkiPLkG9knEsca+p74v0iqK6p2iZjSdEG06hmC9Fdeb/mf9TETVftUjS8Ls+c BaFziTZzRC/Xk0Rx5FsGiiTh/rXHTQnRWD0O0/jXD6PipcEu6D/v2KSpqrEtZ6sGKtKQ nSJjpL47yFMG6OFbr79cdiqFh24mNyK+zPD6wWx9BnEBcHFY2NwYpld4c9YPNeRrwgbN JXprv1ie3HA5zG2HxY545I9KvdXnowBVNFhw4LcoAaxz6FFKpRsmzxoWWqb0JLqv8K0i U94Q== X-Gm-Message-State: AOAM530fqbM1obMnHAO5Mr5JjH9ZwhEmkpthxLKbjIuwhH/nyjw8/UJj UsOfVMsP0ZRst433SEgYklrhWk3i4/vUTDU5 X-Received: by 2002:a62:860a:0:b029:2ec:81e1:23e4 with SMTP id x10-20020a62860a0000b02902ec81e123e4mr5894381pfd.11.1623378519956; Thu, 10 Jun 2021 19:28:39 -0700 (PDT) Received: from raspberrypi ([125.141.84.155]) by smtp.gmail.com with ESMTPSA id 65sm3586605pfu.159.2021.06.10.19.28.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 19:28:39 -0700 (PDT) Date: Fri, 11 Jun 2021 03:28:35 +0100 From: Austin Kim To: jmorris@namei.org, serge@hallyn.com Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, austin.kim@lge.com, austindh.kim@gmail.com Subject: [PATCH] audit: remove unnecessary 'ret' initialization Message-ID: <20210611022835.GA1031@raspberrypi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Austin Kim The variable 'ret' is set to 0 when declared. The 'ret' is unused until it is set to 0 again. So it had better remove unnecessary initialization. Signed-off-by: Austin Kim --- security/lsm_audit.c | 1 - 1 file changed, 1 deletion(-) diff --git a/security/lsm_audit.c b/security/lsm_audit.c index 82ce14933513..5a5016ef43b0 100644 --- a/security/lsm_audit.c +++ b/security/lsm_audit.c @@ -119,7 +119,6 @@ int ipv6_skb_to_auditdata(struct sk_buff *skb, return -EINVAL; ad->u.net->v6info.saddr = ip6->saddr; ad->u.net->v6info.daddr = ip6->daddr; - ret = 0; /* IPv6 can have several extension header before the Transport header * skip them */ offset = skb_network_offset(skb); -- 2.20.1