android_kernel_motorola_sm6225/drivers/net/ethernet/dec/tulip
Peter Senna Tschudin 5b896029e9 drivers/net/ethernet/dec/tulip/dmfe.c: fix error return code
The function dmfe_init_one() return 0 for success and negative value
for most of its internal tests failures. There are three exceptions
that are error cases going to err_out_*:. Fore this three cases the
function abort its success execution path, but returns non negative
value, making it dificult for a caller function to notice the error.

This patch fixes the error cases that do not return negative values.

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:04 -04:00
..
21142.c drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
de4x5.c ethernet: Remove casts to same type 2012-06-06 09:31:33 -07:00
de4x5.h drivers/net/ethernet: remove unused #define. 2011-10-03 14:09:10 -04:00
de2104x.c drivers/net/ethernet/dec/tulip: Use standard __set_bit_le() function 2012-10-06 03:04:55 +09:00
dmfe.c drivers/net/ethernet/dec/tulip/dmfe.c: fix error return code 2012-10-07 14:37:04 -04:00
eeprom.c sections: fix section conflicts in drivers/net 2012-10-06 03:04:42 +09:00
interrupt.c netdev: ethernet dev_alloc_skb to netdev_alloc_skb 2012-02-06 11:48:09 -05:00
Kconfig MII: fix Kconfig dependencies for MII 2011-09-15 15:49:08 -04:00
Makefile
media.c drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
pnic.c drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
pnic2.c drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
timer.c drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
tulip.h drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
tulip_core.c drivers/net/ethernet/dec/tulip: Use standard __set_bit_le() function 2012-10-06 03:04:55 +09:00
uli526x.c uli526x: stop using net_device.{base_addr, irq} and convert to __iomem. 2012-04-07 11:47:17 +02:00
winbond-840.c sections: fix section conflicts in drivers/net 2012-10-06 03:04:42 +09:00
xircom_cb.c xircom_cb: stop using net_device.{base_addr, irq} and convert to __iomem. 2012-04-07 11:47:16 +02:00