linux/drivers/net/ethernet
Peter Senna Tschudin 4df128341e drivers/net/ethernet/sun/sungem.c: fix error return code
The function gem_init_one() return 0 for success and negative value
for most of its internal tests failures. There is one exception
that is error case going to err_out_free_consistent:. For this error
case, the function abort its success execution path, but returns non
negative value, making it difficult for a caller function to notice
the error.

This patch fixes the error case that do not return negative value.

This was found by Coccinelle, but the code change was made by hand.
This patch is not robot generated.

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

// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-07 14:37:12 -04:00
..
3com
8390 sections: fix section conflicts in drivers/net 2012-10-06 03:04:42 +09:00
adaptec sections: fix section conflicts in drivers/net 2012-10-06 03:04:42 +09:00
adi
aeroflex
alteon
amd drivers/net/ethernet/amd/au1000_eth.c: fix error return code 2012-10-07 14:37:11 -04:00
apple
atheros sections: fix section conflicts in drivers/net 2012-10-06 03:04:42 +09:00
broadcom bnx2x: fix ring size for 10G functions 2012-10-03 16:34:15 -04:00
brocade
cadence
calxeda net: remove skb recycling 2012-10-07 00:40:54 -04:00
chelsio cxgb4: Fix build error due to missing linux/vmalloc.h include. 2012-10-03 20:50:08 -04:00
cirrus
cisco
davicom
dec drivers/net/ethernet/dec/tulip/dmfe.c: fix error return code 2012-10-07 14:37:04 -04:00
dlink sections: fix section conflicts in drivers/net 2012-10-06 03:04:42 +09:00
emulex Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-10-02 13:38:27 -07:00
faraday
freescale net: remove skb recycling 2012-10-07 00:40:54 -04:00
fujitsu
hp
i825xx
ibm Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
icplus
intel ixgbe: add support for X540-AT1 2012-10-03 08:38:30 -07:00
marvell net: remove skb recycling 2012-10-07 00:40:54 -04:00
mellanox First batch of InfiniBand/RDMA changes for the 3.7 merge window: 2012-10-02 17:20:40 -07:00
micrel
microchip
myricom
natsemi drivers/net/ethernet/natsemi/xtsonic.c: fix error return code 2012-10-07 14:37:12 -04:00
neterion Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
nuvoton
nvidia
nxp
octeon
oki-semi pch_gbe: Fix PTP dependencies. 2012-10-02 22:34:04 -04:00
packetengines
pasemi
qlogic drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c: fix error return code 2012-10-07 14:37:11 -04:00
racal
rdc
realtek sections: fix section conflicts in drivers/net 2012-10-06 03:04:42 +09:00
renesas drivers/net/ethernet/renesas/sh_eth.c: fix error return code 2012-10-07 14:37:12 -04:00
seeq
sfc drivers/net/ethernet/sfc: use standard __{clear,set}_bit_le() functions 2012-10-06 03:04:54 +09:00
sgi
silan
sis drivers/net/ethernet/sis/sis900.c: fix error return code 2012-10-07 14:37:10 -04:00
smsc
stmicro net: remove skb recycling 2012-10-07 00:40:54 -04:00
sun drivers/net/ethernet/sun/sungem.c: fix error return code 2012-10-07 14:37:12 -04:00
tehuti
ti net: ethernet: davinci_cpdma: decrease the desc count when cleaning up the remaining packets 2012-10-02 22:34:21 -04:00
tile
toshiba
tundra
via
wiznet
xilinx
xircom
xscale
dnet.c
dnet.h
ethoc.c
fealnx.c sections: fix section conflicts in drivers/net 2012-10-06 03:04:42 +09:00
jme.c
jme.h
Kconfig
korina.c
lantiq_etop.c
Makefile
netx-eth.c
s6gmac.c