diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-06-23 18:16:25 +0300 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2017-07-13 15:58:28 -0400 |
commit | 4cd1ec95bdec8aedb280ca0f244ededb76f747ab (patch) | |
tree | 3eb9a37f39c2ea77a1434cb7a0cd11be8ccd59ad /fs/nfs/nfs4idmap.c | |
parent | ce85bd29210f2cd84dc1f762c3992d8e6db822c2 (diff) | |
download | blackbird-op-linux-4cd1ec95bdec8aedb280ca0f244ededb76f747ab.tar.gz blackbird-op-linux-4cd1ec95bdec8aedb280ca0f244ededb76f747ab.zip |
NFS: silence a uninitialized variable warning
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>
Diffstat (limited to 'fs/nfs/nfs4idmap.c')
-rw-r--r-- | fs/nfs/nfs4idmap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/nfs4idmap.c b/fs/nfs/nfs4idmap.c index 835c163f61af..dd5d27da8c0c 100644 --- 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; } |