All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jing Wang <windsdaemon@gmail.com>
To: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Pavel Emelyanov <xemul@parallels.com>
Cc: netdev@vger.kernel.org, Jing Wang <windsdaemon@gmail.com>
Subject: [PATCH 1/1] net: fix compile warning in af_unix.c
Date: Tue, 30 Oct 2012 15:16:36 +0800	[thread overview]
Message-ID: <1351581396-20493-1-git-send-email-windsdaemon@gmail.com> (raw)

This patch fix some compile warning as follows:
net/unix/af_unix.c: In function 'unix_bind':
net/unix/af_unix.c:895: warning: 'path.dentry' may be used uninitialized in this function
net/unix/af_unix.c:895: warning: 'path.mnt' may be used uninitialized in this function

Signed-off-by: Jing Wang <windsdaemon@gmail.com>
---
 net/unix/af_unix.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 5b5c876..9f710ac 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -895,6 +895,8 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
 		struct path path;
 		umode_t mode = S_IFSOCK |
 		       (SOCK_INODE(sock)->i_mode & ~current_umask());
+		path.mnt = NULL;
+		path.dentry = NULL;
 		err = unix_mknod(sun_path, mode, &path);
 		if (err) {
 			if (err == -EEXIST)
-- 
1.7.5.4

             reply	other threads:[~2012-10-30  7:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-30  7:16 Jing Wang [this message]
2012-10-30 14:00 ` [PATCH 1/1] net: fix compile warning in af_unix.c Stephen Hemminger
2012-10-31  0:46   ` jing wang

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=1351581396-20493-1-git-send-email-windsdaemon@gmail.com \
    --to=windsdaemon@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xemul@parallels.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.