public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] kprobes: fix compiler warning
@ 2013-07-01 14:46 Dong Fang
  2013-07-14 17:48 ` Dong Fang
  0 siblings, 1 reply; 2+ messages in thread
From: Dong Fang @ 2013-07-01 14:46 UTC (permalink / raw)
  To: viro; +Cc: nyc, fweisbec, dhowells, mchehab, linux-kernel, Dong Fang

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-14  5:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-01 14:46 [PATCH v2] kprobes: fix compiler warning Dong Fang
2013-07-14 17:48 ` Dong Fang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox