projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce85bd2
)
NFS: silence a uninitialized variable warning
author
Dan Carpenter
<dan.carpenter@oracle.com>
Fri, 23 Jun 2017 15:16:25 +0000
(18:16 +0300)
committer
Anna Schumaker
<Anna.Schumaker@Netapp.com>
Thu, 13 Jul 2017 19:58:28 +0000
(15:58 -0400)
Static checkers have gotten clever enough to complain that "id_long" is
uninitialized on the failure path. It's harmless, but simple to fix.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4idmap.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/nfs/nfs4idmap.c
b/fs/nfs/nfs4idmap.c
index 835c163f61af5324c988d1c38e51bfeb47983e76..dd5d27da8c0cc5f19d96c33360400778a6a60b5c 100644
(file)
--- a/
fs/nfs/nfs4idmap.c
+++ b/
fs/nfs/nfs4idmap.c
@@
-364,7
+364,8
@@
static int nfs_idmap_lookup_id(const char *name, size_t namelen, const char *typ
ret = -EINVAL;
} else {
ret = kstrtol(id_str, 10, &id_long);
- *id = (__u32)id_long;
+ if (!ret)
+ *id = (__u32)id_long;
}
return ret;
}