linux/drivers/net/ethernet/freescale/fs_enet
Julia Lawall 137bc99ff3 drivers/net/ethernet/freescale/fs_enet: 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.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-08-14 17:00:56 -07:00
..
Kconfig MII: fix Kconfig dependencies for MII 2011-09-15 15:49:08 -04:00
Makefile
fec.h fs_enet: Add MPC5125 FEC support and PHY interface selection 2012-03-19 18:02:05 -04:00
fs_enet-main.c fs_enet: Support the get_ts_info ethtool method. 2012-04-04 05:28:47 -04:00
fs_enet.h
mac-fcc.c
mac-fec.c fs_enet: Add MPC5125 FEC support and PHY interface selection 2012-03-19 18:02:05 -04:00
mac-scc.c
mii-bitbang.c drivers/net/ethernet/freescale/fs_enet: fix error return code 2012-08-14 17:00:56 -07:00
mii-fec.c drivers/net/ethernet/freescale/fs_enet: fix error return code 2012-08-14 17:00:56 -07:00