aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dynamic_debug.c
diff options
context:
space:
mode:
authorJulia Lawall <[email protected]>2010-10-15 13:00:09 +0000
committerRalf Baechle <[email protected]>2010-10-19 17:32:40 +0000
commit6cc0cc4a35337b48e09c82c5f3fb83534884fca8 (patch)
tree67ea9e34e23f102bb67730bf7a690981831f5756 /lib/dynamic_debug.c
parentMIPS: jz4740: Fix Kbuild Platform file. (diff)
downloadkernel-6cc0cc4a35337b48e09c82c5f3fb83534884fca8.tar.gz
kernel-6cc0cc4a35337b48e09c82c5f3fb83534884fca8.zip
SERIAL: ioc3_serial: 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 <[email protected]> To: Pat Gefre <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1704/ Signed-off-by: Ralf Baechle <[email protected]>
Diffstat (limited to 'lib/dynamic_debug.c')
0 files changed, 0 insertions, 0 deletions