diff options
author | Greg Kurz | 2019-10-10 11:36:05 +0200 |
---|---|---|
committer | Greg Kurz | 2019-10-10 11:36:05 +0200 |
commit | ea52cdd443840448c198fec48e5a9ea5f40564f0 (patch) | |
tree | d88cea8dd8a30f705f01e41492a403e37b2c7274 /hw/9pfs/9p-local.c | |
parent | 9p: Simplify error path of v9fs_device_realize_common() (diff) | |
download | qemu-ea52cdd443840448c198fec48e5a9ea5f40564f0.tar.gz qemu-ea52cdd443840448c198fec48e5a9ea5f40564f0.tar.xz qemu-ea52cdd443840448c198fec48e5a9ea5f40564f0.zip |
fsdev: Add return value to fsdev_throttle_parse_opts()
It is more convenient to use the return value of the function to notify
errors, rather than to be tied up setting up the &local_err boilerplate.
Signed-off-by: Greg Kurz <groug@kaod.org>
Diffstat (limited to 'hw/9pfs/9p-local.c')
-rw-r--r-- | hw/9pfs/9p-local.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index 6f7309f4e6..5c7f4cd9c7 100644 --- a/hw/9pfs/9p-local.c +++ b/hw/9pfs/9p-local.c @@ -1511,8 +1511,7 @@ static int local_parse_opts(QemuOpts *opts, FsDriverEntry *fse, Error **errp) return -1; } - fsdev_throttle_parse_opts(opts, &fse->fst, &local_err); - if (local_err) { + if (fsdev_throttle_parse_opts(opts, &fse->fst, &local_err)) { error_propagate_prepend(errp, local_err, "invalid throttle configuration: "); return -1; |