All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sesterhenn <snakebyte@gmx.de>
To: reiserfs-list@namesys.com
Subject: [Patch] Remove unneeded check for xadir in fs/reiserfs/xattr.c
Date: Tue, 13 Jun 2006 23:54:01 +0200	[thread overview]
Message-ID: <1150235641.6537.2.camel@alice> (raw)

hi,

coverity complained that xadir is checked for !=NULL
and then passed to lookup_one_len() where it might get dereferenced.
This patch removes the check since open_xa_dir() returns an ERR_PTR() or
a valid dentry pointer. Coverity id #1194

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>

--- linux-2.6.17-rc5/fs/reiserfs/xattr.c.orig	2006-06-13 23:50:10.000000000 +0200
+++ linux-2.6.17-rc5/fs/reiserfs/xattr.c	2006-06-13 23:50:45.000000000 +0200
@@ -200,7 +200,7 @@ static struct dentry *get_xa_file_dentry
 	xadir = open_xa_dir(inode, flags);
 	if (IS_ERR(xadir)) {
 		return ERR_PTR(PTR_ERR(xadir));
-	} else if (xadir && !xadir->d_inode) {
+	} else if (!xadir->d_inode) {
 		dput(xadir);
 		return ERR_PTR(-ENODATA);
 	}



             reply	other threads:[~2006-06-13 21:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-13 21:54 Eric Sesterhenn [this message]
2006-06-14 14:39 ` [Patch] Remove unneeded check for xadir in fs/reiserfs/xattr.c Jeff Mahoney

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=1150235641.6537.2.camel@alice \
    --to=snakebyte@gmx.de \
    --cc=reiserfs-list@namesys.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.