dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/drivers/atm
Julia Lawall f716168b8a drivers/atm/iphase.c: fix error return code
Convert a 0 error return code to a negative one, as returned elsewhere in the
function.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier ret;
expression e,e1,e2,e3,e4,x;
@@

(
if (\(ret != 0\|ret < 0\) || ...) { ... return ...; }
|
ret = 0
)
... when != ret = e1
*x = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\|ioremap\|ioremap_nocache\|devm_ioremap\|devm_ioremap_nocache\)(...);
... when != x = e2
    when != ret = e3
*if (x == NULL || ...)
{
  ... when != ret = e4
*  return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-08-06 13:29:57 -07:00
..
.gitignore
Kconfig
Makefile
adummy.c
ambassador.c
ambassador.h
atmtcp.c
eni.c
eni.h
firestream.c
firestream.h
fore200e.c
fore200e.h
he.c
he.h
horizon.c
horizon.h
idt77105.c
idt77105.h
idt77252.c
idt77252.h
idt77252_tables.h
iphase.c drivers/atm/iphase.c: fix error return code 2012-08-06 13:29:57 -07:00
iphase.h
lanai.c
midway.h
nicstar.c
nicstar.h
nicstarmac.c
nicstarmac.copyright
solos-attrlist.c
solos-pci.c
suni.c
suni.h
tonga.h
uPD98401.h
uPD98402.c
uPD98402.h
zatm.c
zatm.h
zeprom.h