[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/7] 9p: v9fs fix odd_ptr_err.cocci warnings
From: |
edward . shishkin |
Subject: |
[Qemu-devel] [PATCH 4/7] 9p: v9fs fix odd_ptr_err.cocci warnings |
Date: |
Mon, 12 Dec 2016 19:15:39 +0100 |
From: kbuild test robot <address@hidden>
fs/9p/vfs_super.c:145:6-12: inconsistent IS_ERR and PTR_ERR on line 146.
PTR_ERR should access the value just tested by IS_ERR
Semantic patch information:
There can be false positives in the patch case, where it is the call to
IS_ERR that is wrong.
Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci
Signed-off-by: Fengguang Wu <address@hidden>
Signed-off-by: Eduard Shishkin <address@hidden>
---
fs/9p/vfs_super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c
index c1f9af1..24aacec 100644
--- a/fs/9p/vfs_super.c
+++ b/fs/9p/vfs_super.c
@@ -143,7 +143,7 @@ static struct dentry *v9fs_mount(struct file_system_type
*fs_type, int flags,
if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
retval = alloc_init_flush_set(v9ses);
if (IS_ERR(v9ses->flush)) {
- retval = PTR_ERR(fid);
+ retval = PTR_ERR(v9ses->flush);
goto release_sb;
}
sb->s_d_op = &v9fs_cached_dentry_operations;
--
2.7.4
- [Qemu-devel] [RFC][PATCH 0/7] 9p: v9fs read and write speedup - V2, Edward Shishkin, 2016/12/12
- [Qemu-devel] [PATCH 1/7] 9p: v9fs add writepages., edward . shishkin, 2016/12/12
- [Qemu-devel] [PATCH 5/7] 9p: v9fs fix semicolon.cocci warnings, edward . shishkin, 2016/12/12
- [Qemu-devel] [PATCH 6/7] 9p: v9fs fix readpages writepages contexts allocation, edward . shishkin, 2016/12/12
- [Qemu-devel] [PATCH 7/7] 9p: v9fs fix calculation of max number of merged pages, edward . shishkin, 2016/12/12
- [Qemu-devel] [PATCH 3/7] 9p: v9fs fix ifnullfree.cocci warnings, edward . shishkin, 2016/12/12
- [Qemu-devel] [PATCH 4/7] 9p: v9fs fix odd_ptr_err.cocci warnings,
edward . shishkin <=
- [Qemu-devel] [PATCH 2/7] 9p: v9fs new readpages., edward . shishkin, 2016/12/12