mirror of
https://github.com/torvalds/linux.git
synced 2024-11-08 21:21:47 +00:00
0d91f22b75
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> |
||
---|---|---|
.. | ||
eeprom.c | ||
eeprom.h | ||
fwio.c | ||
Kconfig | ||
led.c | ||
lmac.h | ||
main.c | ||
Makefile | ||
net2280.h | ||
p54.h | ||
p54pci.c | ||
p54pci.h | ||
p54spi_eeprom.h | ||
p54spi.c | ||
p54spi.h | ||
p54usb.c | ||
p54usb.h | ||
txrx.c |