qemu-char: do not use error_is_set

error_is_set must only be used if, for some reason, you want to elide a whole
function upon receiving a non-NULL error.  This is never the case in qemu-char,
so we must use a local Error variable and propagate it to errp.

Also works towards fixing some resource leaks reported by Coverity (where a
file descriptor is opened, but then leaked if *errp happened to be non-NULL:
this would be a case where we should have used error_is_set *in the callee*,
while this patch removes uses in the caller).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
cpu/x86: do not use error_is_set

error_is_set must only be used if, for some reason, you want to elide a whole
function upon receiving a non-NULL error.  This is never the case here,
so we must use a local Error variable and propagate it to errp.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
net: do not use error_is_set

It is not needed, we can return early from the function and never reach the "if"
with *errp != NULL.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw: do not use error_is_set

error_is_set must only be used if, for some reason, you want to elide a whole
function upon receiving a non-NULL error.  This is never the case here,
so we must use a local Error variable and propagate it to errp.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
block: do not use error_is_set

error_is_set must only be used if, for some reason, you want to elide a whole
function upon receiving a non-NULL error.  This is never the case here,
so we must use a local Error variable and propagate it to errp.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
backends: do not use error_is_set

error_is_set must only be used if, for some reason, you want to elide a whole
function upon receiving a non-NULL error.  This is never the case here,
so we must use a local Error variable and propagate it to errp.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qga-win32: remove useless error propagation

Error propagation is only useful if we are calling another function and
want to abort on error, or if it otherwise simplifies code.  This code
does neither, so zap it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qga-win32: do not use error_is_set

error_is_set must only be used if, for some reason, you want to elide a whole
function upon receiving a non-NULL error.  This is never the case here,
although it is in other places in this file.  Use a local Error variable
instead, and propagate it to errp.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qga-posix: do not use error_is_set

error_is_set must only be used if, for some reason, you want to elide a whole
function upon receiving a non-NULL error.  This is never the case here,
so we must use a local Error variable and propagate it to errp.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qmp: do not use error_is_set

error_is_set must only be used if, for some reason, you want to elide a whole
function upon receiving a non-NULL error.  This is never the case here,
so we must use a local Error variable and propagate it to errp.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>