Fix c&p bug in the livepatch_do_action() code of
LIVEPATCH_ACTION_REPLACE case.
The correct variable handling return code of revert action is
other->rc in this case.
Coverity-ID:
1457467
Fixes: 6047104c3c ("livepatch: Add per-function applied/reverted state tracking marker")
Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Pawel Wieczorkiewicz <wipawel@amazon.de>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
else
other->rc = revert_payload(other);
- if ( !was_action_consistent(other, rc ? LIVEPATCH_FUNC_APPLIED : LIVEPATCH_FUNC_NOT_APPLIED) )
+ if ( !was_action_consistent(other, other->rc
+ ? LIVEPATCH_FUNC_APPLIED
+ : LIVEPATCH_FUNC_NOT_APPLIED) )
panic("livepatch: partially reverted payload '%s'!\n", other->name);
if ( other->rc == 0 )