aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-09-07 17:38:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-09-07 17:38:21 -0400
commit3c5dff7b5ec7ac1bf356d43ac37e2e4ec7ec063a (patch)
tree1d6be67bfc1175333279da5934805be3921182b0 /fs
parentdc6f962eb5ad728086fcfa9967976e93ed68e0a5 (diff)
parent8f587df479c3cea14ba1a9b9d58f34fd2fd6d58b (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: 9p: potential ERR_PTR() dereference
Diffstat (limited to 'fs')
-rw-r--r--fs/9p/fid.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/9p/fid.c b/fs/9p/fid.c
index 358563689064..6406f896bf95 100644
--- a/fs/9p/fid.c
+++ b/fs/9p/fid.c
@@ -242,7 +242,8 @@ struct p9_fid *v9fs_fid_lookup(struct dentry *dentry)
242 } 242 }
243 kfree(wnames); 243 kfree(wnames);
244fid_out: 244fid_out:
245 v9fs_fid_add(dentry, fid); 245 if (!IS_ERR(fid))
246 v9fs_fid_add(dentry, fid);
246err_out: 247err_out:
247 up_read(&v9ses->rename_sem); 248 up_read(&v9ses->rename_sem);
248 return fid; 249 return fid;