diff options
author | Julia Lawall <julia@diku.dk> | 2010-08-11 06:11:41 -0400 |
---|---|---|
committer | Tyler Hicks <tyhicks@linux.vnet.ibm.com> | 2010-08-27 11:50:52 -0400 |
commit | f137f15072411618e37b338aa13e5ae43583bcf2 (patch) | |
tree | a1679017c58f65b7fd20febab16bb338354bd59b /firmware/keyspan/usa28.HEX | |
parent | 76be97c1fc945db08aae1f1b746012662d643e97 (diff) |
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/)
// <smpl>
@@
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;
}
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Diffstat (limited to 'firmware/keyspan/usa28.HEX')
0 files changed, 0 insertions, 0 deletions