mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dong Fang <yp.fangdong@gmail.com>
To: viro@zeniv.linux.org.uk
Cc: nyc@holomorphy.com, fweisbec@gmail.com, dhowells@redhat.com,
	mchehab@redhat.com, linux-kernel@vger.kernel.org,
	Dong Fang <yp.fangdong@gmail.com>
Subject: [PATCH] kprobes: fix compiler warning
Date: Mon,  1 Jul 2013 10:33:38 -0400	[thread overview]
Message-ID: <1372689218-30703-1-git-send-email-yp.fangdong@gmail.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 717 bytes --]

Fix the following compiler warning of uninitialized variable

kernel/kprobes.c: In function ‘register_kprobe’:
kernel/kprobes.c:1493: warning: ‘probed_mod’ may be used uninitialized in this function

Signed-off-by: Dong Fang <yp.fangdong@gmail.com>
---
 kernel/kprobes.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index bddf3b2..7a5b2b1 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -1490,7 +1490,7 @@ int __kprobes register_kprobe(struct kprobe *p)
 {
 	int ret;
 	struct kprobe *old_p;
-	struct module *probed_mod;
+	struct module *probed_mod = NULL;
 	kprobe_opcode_t *addr;
 
 	/* Adjust probe address from symbol */
-- 
1.7.1


             reply	other threads:[~2013-07-01 14:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-01 14:33 Dong Fang [this message]
2013-07-01 14:46 ` Dong Fang
  -- strict thread matches above, loose matches on Subject: below --
2007-01-30  5:43 [PATCH] kprobes: Fix " Kumar Gala
2007-01-30  5:55 ` Ananth N Mavinakayanahalli
2007-01-30  7:05   ` Kumar Gala
2007-01-30  7:12     ` Kumar Gala
2007-01-30  7:41       ` Andrew Morton
2007-01-31  0:04         ` Kumar Gala

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=1372689218-30703-1-git-send-email-yp.fangdong@gmail.com \
    --to=yp.fangdong@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=nyc@holomorphy.com \
    --cc=viro@zeniv.linux.org.uk \
    /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

Powered by JetHome