9pfs: fail local_statfs() earlier
commit23da0145cc4be66fdb1033f951dbbf140f457896
authorGreg Kurz <groug@kaod.org>
Mon, 6 Mar 2017 16:34:01 +0000 (6 17:34 +0100)
committerGreg Kurz <groug@kaod.org>
Mon, 6 Mar 2017 16:34:01 +0000 (6 17:34 +0100)
tree67080b3a4c82e0ebb47265d8c4c99074c146a6f9
parentfaab207f115cf9738f110cb088ab35a4b7aef73a
9pfs: fail local_statfs() earlier

If we cannot open the given path, we can return right away instead of
passing -1 to fstatfs() and close(). This will make Coverity happy.

(Coverity issue CID1371729)

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Daniel P. berrange <berrange@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
hw/9pfs/9p-local.c