diff options
author | Markus Armbruster <armbru@redhat.com> | 2018-12-13 18:31:13 +0100 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2018-12-18 14:57:48 +0100 |
commit | b2322003b6389c7c98104c8626ffa342928ba83c (patch) | |
tree | fac0963c8ee737e0b1db855722b001c046db1c8e /qga | |
parent | 92917cd25103569ad8992dbc5b4dc2dcacfdda7f (diff) |
error: Remove NULL checks on error_propagate() calls
Patch created mechanically by rerunning:
$ spatch --sp-file scripts/coccinelle/error_propagate_null.cocci \
--macro-file scripts/cocci-macro-file.h \
--dir . --in-place
Whitespace tidied up manually.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20181213173113.11211-1-armbru@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'qga')
-rw-r--r-- | qga/commands-posix.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 1877976522..2e719d9b6b 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -1573,10 +1573,7 @@ static bool systemd_supports_mode(SuspendMode mode, Error **errp) return true; } - if (local_err) { - error_propagate(errp, local_err); - } - + error_propagate(errp, local_err); return false; } @@ -1782,7 +1779,7 @@ static void guest_suspend(SuspendMode mode, Error **errp) if (!mode_supported) { error_setg(errp, "the requested suspend mode is not supported by the guest"); - } else if (local_err) { + } else { error_propagate(errp, local_err); } } |