From: Alexey Klimov <alexey.klimov@linaro.org>
To: linux-mm@kvack.org, catalin.marinas@arm.com
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
klimov.linux@gmail.com, Alexey Klimov <alexey.klimov@linaro.org>
Subject: [PATCH 1/1] mm: kmemleak: remove unneeded initialization of object to NULL
Date: Thu, 10 Sep 2015 01:33:49 +0300 [thread overview]
Message-ID: <1441838029-4596-1-git-send-email-alexey.klimov@linaro.org> (raw)
Few lines below object is reinitialized by lookup_object()
so we don't need to init it by NULL in the beginning of
find_and_get_object().
Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
---
mm/kmemleak.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index f532f6a..444a771 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -488,7 +488,7 @@ static void put_object(struct kmemleak_object *object)
static struct kmemleak_object *find_and_get_object(unsigned long ptr, int alias)
{
unsigned long flags;
- struct kmemleak_object *object = NULL;
+ struct kmemleak_object *object;
rcu_read_lock();
read_lock_irqsave(&kmemleak_lock, flags);
--
2.1.4
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2015-09-09 22:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-09 22:33 Alexey Klimov [this message]
2015-09-10 9:13 ` [PATCH 1/1] mm: kmemleak: remove unneeded initialization of object to NULL Catalin Marinas
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=1441838029-4596-1-git-send-email-alexey.klimov@linaro.org \
--to=alexey.klimov@linaro.org \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=klimov.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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).