android_kernel_motorola_sm6375/drivers/message
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Julia Lawall 1c1acab036 [SCSI] drivers/message/fusion: 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]>
Acked-by: "Desai, Kashyap" <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
2010-09-05 14:55:57 -03:00
..
fusion [SCSI] drivers/message/fusion: Return -ENOMEM on memory allocation failure 2010-09-05 14:55:57 -03:00
i2o i2o: check return code from put_user() 2010-08-11 08:59:06 -07:00
Makefile