summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2500pci.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-10-15 15:00:06 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-10-15 21:57:44 +0200
commit0d91f22b75347d9503b17a42b6c74d3f7750acd6 (patch)
tree55167f95c826e3023bdc1cc436d282a02e7f8bad /drivers/net/wireless/rt2x00/rt2500pci.c
parentath9k: Null out references to stale pointers. (diff)
downloadlinux-0d91f22b75347d9503b17a42b6c74d3f7750acd6.tar.xz
linux-0d91f22b75347d9503b17a42b6c74d3f7750acd6.zip
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>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2500pci.c')
0 files changed, 0 insertions, 0 deletions