1
0
Fork 0

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>
hifive-unleashed-5.1
Dominique Martinet 2015-01-09 12:56:07 +01:00 committed by Eric Van Hensbergen
parent b99baa43e5
commit 5c4086b8de
1 changed files with 1 additions and 1 deletions

View 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;