LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] VFS: initlalise found in fs/block_dev.c:bd_claim_by_kobject()
Date: Wed, 14 Feb 2007 14:35:55 +0900	[thread overview]
Message-ID: <20070214053552.GA8950@verge.net.au> (raw)

The patch below fixes the following warning, which
by my reckoning is valid, though perhaps not
something that happens in practice.

fs/block_dev.c: In function `bd_claim_by_disk':
fs/block_dev.c:953: warning: 'found' might be used uninitialized in this
function

Patch is against the current Linus tree,
33e563c1190c26b6bf61990c505cdcb5cdbba7e4. 2.6.20+

Signed-off-by: Simon Horman <horms@verge.net.au>

Index: linux-2.6/fs/block_dev.c
===================================================================
--- linux-2.6.orig/fs/block_dev.c	2007-02-14 13:31:48.000000000 +0900
+++ linux-2.6/fs/block_dev.c	2007-02-14 13:32:04.000000000 +0900
@@ -950,7 +950,7 @@
 				struct kobject *kobj)
 {
 	int res;
-	struct bd_holder *bo, *found;
+	struct bd_holder *bo, *found = NULL;
 
 	if (!kobj)
 		return -EINVAL;

                 reply	other threads:[~2007-02-14  7:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20070214053552.GA8950@verge.net.au \
    --to=horms@verge.net.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --subject='Re: [PATCH] VFS: initlalise found in fs/block_dev.c:bd_claim_by_kobject()' \
    /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

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).