Files
linux/drivers/net/wireless
Julia Lawall 7577c943f9 drivers/net/wireless/p54/eeprom.c: Return -ENOMEM on memory allocation failure
commit 0d91f22b75 upstream.

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>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-22 10:47:35 -08:00
..
2010-04-26 07:41:32 -07:00
2010-08-10 10:20:41 -07:00
2010-07-05 11:10:28 -07:00
2010-07-05 11:11:13 -07:00
2010-03-15 08:49:37 -07:00
2009-08-20 11:35:58 -04:00
2009-10-29 09:01:07 -07:00