9pfs: fix v9fs_lock error case
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 28 Feb 2017 09:31:46 +0000 (10:31 +0100)
committerGreg Kurz <groug@kaod.org>
Tue, 28 Feb 2017 09:31:46 +0000 (10:31 +0100)
commit4bae2b397fc91bd7eca48bc861dd67f125d4fd1b
tree420769f56272df6daa812b5d551c30f0fb93c574
parent9b9fbe8a4e9eec9072ee2697a6af59144442785f
9pfs: fix v9fs_lock error case

In this case, we are marshaling an error status instead of the errno value.
Reorganize the out and out_nofid labels to look like all the other cases.
Coverity reports this because the "err = -ENOENT" and "err = -EINVAL"
assignments above are dead, overwritten by the call to pdu_marshal.

(Coverity issues CID1348512 and CID1348513)

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(also open-coded the success path since locking is a nop for us, Greg Kurz)
Signed-off-by: Greg Kurz <groug@kaod.org>
hw/9pfs/9p.c