From: Julia Lawall Date: Wed, 11 Aug 2010 10:11:41 +0000 (+0200) Subject: fs/ecryptfs: Return -ENOMEM on memory allocation failure X-Git-Tag: v2.6.36-rc3~7^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f137f15072411618e37b338aa13e5ae43583bcf2;p=pandora-kernel.git fs/ecryptfs: Return -ENOMEM on memory allocation failure In this code, 0 is returned on memory allocation failure, even though other failures return -ENOMEM or other similar values. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression ret; expression x,e1,e2,e3; @@ ret = 0 ... when != ret = e1 *x = \(kmalloc\|kcalloc\|kzalloc\)(...) ... when != ret = e2 if (x == NULL) { ... when != ret = e3 return ret; } // Signed-off-by: Julia Lawall Signed-off-by: Tyler Hicks --- Reading git-diff-tree failed