[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190204135653.31406-3-pmladek@suse.com>
Date: Mon, 4 Feb 2019 14:56:51 +0100
From: Petr Mladek <pmladek@...e.com>
To: Jiri Kosina <jikos@...nel.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Miroslav Benes <mbenes@...e.cz>
Cc: Jason Baron <jbaron@...mai.com>,
Joe Lawrence <joe.lawrence@...hat.com>,
Evgenii Shatokhin <eshatokhin@...tuozzo.com>,
live-patching@...r.kernel.org, linux-kernel@...r.kernel.org,
Petr Mladek <pmladek@...e.com>
Subject: [PATCH v2 2/4] livepatch: return -ENOMEM on ptr_id() allocation failure
From: Joe Lawrence <joe.lawrence@...hat.com>
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@...hat.com>
Signed-off-by: Petr Mladek <pmladek@...e.com>
---
lib/livepatch/test_klp_shadow_vars.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/livepatch/test_klp_shadow_vars.c b/lib/livepatch/test_klp_shadow_vars.c
index 02f892f941dc..f5441c193166 100644
--- a/lib/livepatch/test_klp_shadow_vars.c
+++ b/lib/livepatch/test_klp_shadow_vars.c
@@ -44,7 +44,7 @@ static int ptr_id(void *ptr)
sp = kmalloc(sizeof(*sp), GFP_ATOMIC);
if (!sp)
- return -1;
+ return -ENOMEM;
sp->ptr = ptr;
sp->id = count++;
--
2.13.7
Powered by blists - more mailing lists