From: Dan Carpenter Date: Sat, 12 Jun 2010 18:57:39 +0000 (+0200) Subject: selinux: fix error codes in symtab_init() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9a7982793c3aee6ce86d8e7e15306215257329f2;p=mv-sheeva.git selinux: fix error codes in symtab_init() hashtab_create() only returns NULL on allocation failures to -ENOMEM is appropriate here. Signed-off-by: Dan Carpenter Acked-by: Eric Paris Acked-by: Stephen D. Smalley Signed-off-by: James Morris --- diff --git a/security/selinux/ss/symtab.c b/security/selinux/ss/symtab.c index bcf9f620426..160326ee99e 100644 --- a/security/selinux/ss/symtab.c +++ b/security/selinux/ss/symtab.c @@ -36,7 +36,7 @@ int symtab_init(struct symtab *s, unsigned int size) { s->table = hashtab_create(symhash, symcmp, size); if (!s->table) - return -1; + return -ENOMEM; s->nprim = 0; return 0; }