fs/9p: Initialize status in v9fs_file_do_lock.
authorDominique Martinet <dominique.martinet@cea.fr>
Fri, 9 Jan 2015 11:56:07 +0000 (12:56 +0100)
committerEric Van Hensbergen <ericvh@gmail.com>
Sun, 22 Mar 2015 02:30:31 +0000 (19:30 -0700)
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>
fs/9p/vfs_file.c

index 9612e5fc0ae2416b53ac78168ab1bddd900b307d..bdb103f73e34fa0ec9ef440bc85d1984df2604fb 100644 (file)
@@ -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;
 
This page took 0.02491 seconds and 5 git commands to generate.