public inbox for linux-security-module@vger.kernel.org
 help / color / mirror / Atom feed
From: Austin Kim <austindh.kim@gmail.com>
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
Date: Fri, 11 Jun 2021 03:28:35 +0100	[thread overview]
Message-ID: <20210611022835.GA1031@raspberrypi> (raw)

From: Austin Kim <austin.kim@lge.com>

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 <austin.kim@lge.com>
---
 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


             reply	other threads:[~2021-06-11  2:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11  2:28 Austin Kim [this message]
2021-06-11 17:23 ` [PATCH] audit: remove unnecessary 'ret' initialization Paul Moore

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=20210611022835.GA1031@raspberrypi \
    --to=austindh.kim@gmail.com \
    --cc=austin.kim@lge.com \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=serge@hallyn.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