linux/drivers/net/wireless/p54
Julia Lawall 0d91f22b75 drivers/net/wireless/p54/eeprom.c: 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>
Cc: <stable@kernel.org>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-10-15 15:57:44 -04:00
..
eeprom.c drivers/net/wireless/p54/eeprom.c: Return -ENOMEM on memory allocation failure 2010-10-15 15:57:44 -04:00
eeprom.h
fwio.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2010-08-24 16:35:40 -04:00
Kconfig p54spi: Kconfig option for config blob 2010-08-25 14:33:18 -04:00
led.c drivers/net/wireless: Restore upper case words in wiphy_<level> messages 2010-08-18 16:37:44 -04:00
lmac.h
main.c mac80211: use cipher suite selectors 2010-08-16 16:45:11 -04:00
Makefile
net2280.h drivers/net: use __packed annotation 2010-06-03 03:18:23 -07:00
p54.h p54: remove get_tx_stats() mac80211 op 2010-02-08 16:51:01 -05:00
p54pci.c drivers/net/wireless: Restore upper case words in wiphy_<level> messages 2010-08-18 16:37:44 -04:00
p54pci.h drivers/net: use __packed annotation 2010-06-03 03:18:23 -07:00
p54spi_eeprom.h p54spi: fix eeprom checksum 2010-08-24 16:28:14 -04:00
p54spi.c p54spi: Add error message for eeprom failure 2010-09-07 13:54:34 -04:00
p54spi.h drivers/net: use __packed annotation 2010-06-03 03:18:23 -07:00
p54usb.c p54usb: add five more USBIDs 2010-10-05 13:35:25 -04:00
p54usb.h drivers/net: use __packed annotation 2010-06-03 03:18:23 -07:00
txrx.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2010-09-24 15:52:34 -04:00