lkml.org 
[lkml]   [2006]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[Patch] Remove needless checks in fs/9p/vfs_inode.c
From
Date
hi,

coverity found two needless checks in vfs_inode.c (cid #1165 and #1164)
In both cases inode is always NULL when we goto error; either because it
is still initialized to NULL or is set to NULL explicitly. This patch
simply removes these checks to save some code.

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


--- linux-2.6.17-rc5/fs/9p/vfs_inode.c.orig 2006-06-13 22:01:56.000000000 +0200
+++ linux-2.6.17-rc5/fs/9p/vfs_inode.c 2006-06-13 22:02:18.000000000 +0200
@@ -530,9 +530,6 @@ error:
if (vfid)
v9fs_fid_destroy(vfid);

- if (inode)
- iput(inode);
-
return err;
}

@@ -1171,9 +1168,6 @@ error:
if (vfid)
v9fs_fid_destroy(vfid);

- if (inode)
- iput(inode);
-
return err;

}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-13 22:09    [W:0.022 / U:3.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site