From: "Ola N. Kaldestad" <mail@okal.no>
To: keescook@chromium.org
Cc: mcgrof@kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, "Ola N. Kaldestad" <mail@okal.no>
Subject: [PATCH] Fix code-style warning
Date: Thu, 9 Nov 2017 15:40:35 +0100 [thread overview]
Message-ID: <1510238435-1655-1-git-send-email-mail@okal.no> (raw)
Removed unnecessary else block, and removed redundant return and call to kfree in if block.
Signed-off-by: Ola N. Kaldestad <mail@okal.no>
---
kernel/sysctl.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index d9c31bc..87fbb3e 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -3089,14 +3089,12 @@ int proc_do_large_bitmap(struct ctl_table *table, int write,
else
bitmap_copy(bitmap, tmp_bitmap, bitmap_len);
}
- kfree(tmp_bitmap);
*lenp -= left;
*ppos += *lenp;
- return 0;
- } else {
- kfree(tmp_bitmap);
- return err;
}
+
+ kfree(tmp_bitmap);
+ return err;
}
#else /* CONFIG_PROC_SYSCTL */
--
2.7.4
next reply other threads:[~2017-11-09 14:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-09 14:40 Ola N. Kaldestad [this message]
[not found] <20171113232654.9473-1-mail@okal.no>
2017-11-13 23:41 ` [PATCH] Fix: code-style warning Kees Cook
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=1510238435-1655-1-git-send-email-mail@okal.no \
--to=mail@okal.no \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
/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).