summaryrefslogtreecommitdiff
path: root/drivers/ps3
diff options
context:
space:
mode:
authorPeter Senna Tschudin <peter.senna@gmail.com>2012-10-05 12:10:50 (GMT)
committerDavid S. Miller <davem@davemloft.net>2012-10-07 18:37:11 (GMT)
commit2dfc96719187d3cb632922a9455abd008db467eb (patch)
treed64b3c3d6c55b62ed0d5c2c602f9a3bf257bbbd0 /drivers/ps3
parent14834540cafff24944affd6290f01359799a48ce (diff)
downloadlinux-fsl-qoriq-2dfc96719187d3cb632922a9455abd008db467eb.tar.xz
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>
Diffstat (limited to 'drivers/ps3')
0 files changed, 0 insertions, 0 deletions