From: Dr. David Alan Gilbert Date: Wed, 1 Jul 2020 09:35:57 +0000 (+0100) Subject: migration: postcopy take proper error return X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=617a32f5295ee4efcc17abadcecc3cf482c98e80;p=qemu.git migration: postcopy take proper error return This function returns a boolean success and we're returning -1; lets just use the 'out' error path. Signed-off-by: Dr. David Alan Gilbert Fixes: 58b7c17e226 ("Disable mlock around incoming postcopy") Buglink: https://bugs.launchpad.net/qemu/+bug/1885720 Message-Id: <20200701093557.130096-1-dgilbert@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Dr. David Alan Gilbert --- diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index a36402722b..bef2a3afed 100644 --- a/migration/postcopy-ram.c +++ b/migration/postcopy-ram.c @@ -389,7 +389,7 @@ bool postcopy_ram_supported_by_host(MigrationIncomingState *mis) */ if (munlockall()) { error_report("%s: munlockall: %s", __func__, strerror(errno)); - return -1; + goto out; } /*