diff options
author | Dominique Martinet <dominique.martinet@cea.fr> | 2015-01-09 12:56:07 +0100 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2015-03-22 03:30:31 +0100 |
commit | 5c4086b8de6989f10ae814f5746604fc44a02a21 (patch) | |
tree | a245e7e9d4b6ab1c8b48e2d1344e8f0bcae9feb6 /fs | |
parent | net/9p: Initialize opts->privport as it should be. (diff) | |
download | linux-5c4086b8de6989f10ae814f5746604fc44a02a21.tar.xz linux-5c4086b8de6989f10ae814f5746604fc44a02a21.zip |
fs/9p: Initialize status in v9fs_file_do_lock.
If p9_client_lock_dotl returns an error, status is possibly never filled
but will be used in the following switch.
Initializing it to P9_LOCK_ERROR makes sur we will return an error and
cleanup (and not hit the default case).
Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/9p/vfs_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 9612e5fc0ae2..bdb103f73e34 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -149,7 +149,7 @@ static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl) { struct p9_flock flock; struct p9_fid *fid; - uint8_t status; + uint8_t status = P9_LOCK_ERROR; int res = 0; unsigned char fl_type; |