livepatch: return -ENOMEM on ptr_id() allocation failure
authorJoe Lawrence <joe.lawrence@redhat.com>
Mon, 4 Feb 2019 13:56:51 +0000 (14:56 +0100)
committerPetr Mladek <pmladek@suse.com>
Wed, 6 Feb 2019 10:00:58 +0000 (11:00 +0100)
commit86e43f23c17126e32820a1b37d747d06f3056570
treef1aa71c9381712e7e13e24afe81afa3bfb53add1
parentecba29f434a8fa333356d54d2491d174c4aab8de
livepatch: return -ENOMEM on ptr_id() allocation failure

Fixes the following smatch warning:

  lib/livepatch/test_klp_shadow_vars.c:47 ptr_id() warn: returning -1 instead of -ENOMEM is sloppy

Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Petr Mladek <pmladek@suse.com>
lib/livepatch/test_klp_shadow_vars.c