linux/drivers/net/ethernet/qlogic/qlcnic
Peter Senna Tschudin 2dfc967191 drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c: fix error return code
The function qlcnic_probe() 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_netdev:. 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:11 -04:00
..
Makefile
qlcnic.h qlcnic: Fix protcol type in case of inband vlan. 2012-06-07 13:18:54 -07:00
qlcnic_ctx.c qlcnic: Fix scheduling while atomic bug 2012-09-27 19:24:52 -04:00
qlcnic_ethtool.c qlcnic-ethtool: set the ethtool_dump flag by ETH_FW_DUMP_DISABLE value that is zero, if firmware dump is disabled. 2012-05-15 13:13:33 -04:00
qlcnic_hdr.h qlcnic: Fix estimation of recv MSS in case of LRO 2012-06-07 13:18:53 -07:00
qlcnic_hw.c sections: fix section conflicts in drivers/net 2012-10-06 03:04:42 +09:00
qlcnic_init.c qlcnic: remove unnecessary setting of skb->dev 2012-07-10 23:24:57 -07:00
qlcnic_main.c drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c: fix error return code 2012-10-07 14:37:11 -04:00