livepatch: Handle allocation failure in the sample of shadow variable API
authorPetr Mladek <pmladek@suse.com>
Thu, 16 Jan 2020 15:31:45 +0000 (16:31 +0100)
committerJiri Kosina <jkosina@suse.cz>
Fri, 17 Jan 2020 10:12:06 +0000 (11:12 +0100)
commitf46e49a9cc3814f3564477f0fffc00e0a2bc9e80
tree4b9fbbe6954225043b3b2f4261ae861b16119d55
parentbe6da98425b69388ed31b18bd2497f826116f29b
livepatch: Handle allocation failure in the sample of shadow variable API

klp_shadow_alloc() is not handled in the sample of shadow variable API.
It is not strictly necessary because livepatch_fix1_dummy_free() is
able to handle the potential failure. But it is an example and it should
use the API a clean way.

Signed-off-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Joe Lawrence <joe.lawrence@redhat.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
samples/livepatch/livepatch-shadow-fix1.c