提交 5c4086b8 编写于 作者: D Dominique Martinet 提交者: Eric Van Hensbergen

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: NDominique Martinet <dominique.martinet@cea.fr>
Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
上级 b99baa43
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册