linux/drivers/net/ethernet/natsemi
Peter Senna Tschudin 97db4b9d02 drivers/net/ethernet/natsemi/xtsonic.c: fix error return code
The function sonic_probe1() return 0 for success and negative value
for most of its internal tests failures. There is one exception
that is error case going to out:. 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
..
ibmlana.c
ibmlana.h
jazzsonic.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
Kconfig drivers/net: delete all code/drivers depending on CONFIG_MCA 2012-05-17 16:37:41 -04:00
macsonic.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
Makefile drivers/net: delete all code/drivers depending on CONFIG_MCA 2012-05-17 16:37:41 -04:00
natsemi.c drivers/net/ethernet/natsemi/natsemi.c: fix error return code 2012-10-07 14:37:04 -04:00
ns83820.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
sonic.c sonice: Fix build due to botched netdev_alloc_skb() conversion. 2012-02-07 15:28:15 -05:00
sonic.h
xtsonic.c drivers/net/ethernet/natsemi/xtsonic.c: fix error return code 2012-10-07 14:37:12 -04:00