OpenCloudOS-Kernel/drivers/net/irda
Peter Senna Tschudin 14834540ca drivers/net/irda/sh_sir.c: fix error return code
The function sh_sir_probe() return 0 for success and negative value
for most of its internal tests failures. There are two exceptions
that are error cases going to err_mem_*:. For this two 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:11 -04:00
..
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-05-22 19:22:50 -07:00
Makefile
act200l-sir.c drivers/net/*/: Use static const 2010-12-21 02:16:10 -08:00
actisys-sir.c
ali-ircc.c drivers: net: Remove casts to same type 2012-06-06 09:31:33 -07:00
ali-ircc.h
au1k_ir.c drivers: net: Remove casts to same type 2012-06-06 09:31:33 -07:00
bfin_sir.c drivers: net: irda: bfin_sir: fix compile error 2012-08-08 15:40:25 -07:00
bfin_sir.h net/irda: convert bfin_sir to common Blackfin UART header 2011-05-24 01:13:11 -04:00
donauboe.c donauboe: replace excessive udelay with msleep 2012-04-21 15:28:47 -04:00
donauboe.h Fix common misspellings 2011-03-31 11:26:23 -03:00
ep7211-sir.c
esi-sir.c
girbil-sir.c Fix common misspellings 2011-03-31 11:26:23 -03:00
irda-usb.c USB: irda-usb.c: remove err() usage 2012-04-25 14:48:49 -07:00
irda-usb.h drivers/net: use __packed annotation 2010-06-03 03:18:23 -07:00
irtty-sir.c drivers/net/irda/irtty-sir.c: fix error return code 2012-10-07 14:37:10 -04:00
irtty-sir.h
kingsun-sir.c USB: kingsun-sir.c: remove err() usage 2012-04-25 14:48:50 -07:00
ks959-sir.c drivers/net/irda: fix error return code 2012-08-20 02:33:21 -07:00
ksdazzle-sir.c drivers/net/irda: fix error return code 2012-08-20 02:33:21 -07:00
litelink-sir.c
ma600-sir.c
mcp2120-sir.c
mcs7780.c drivers/net/irda/mcs7780.c: fix error return code 2012-10-07 14:37:11 -04:00
mcs7780.h
nsc-ircc.c treewide: Fix typos in various parts of the kernel, and fix some comments. 2011-12-02 14:57:31 +01:00
nsc-ircc.h Fix common misspellings 2011-03-31 11:26:23 -03:00
old_belkin-sir.c
pxaficp_ir.c drivers/net/irda/pxaficp_ir.c: fix error return code 2012-10-07 14:37:11 -04:00
sa1100_ir.c drivers/net/irda/sa1100_ir.c: fix error return code 2012-10-07 14:37:11 -04:00
sh_irda.c drivers/net/irda/sh_irda.c: fix error return code 2012-10-07 14:37:11 -04:00
sh_sir.c drivers/net/irda/sh_sir.c: fix error return code 2012-10-07 14:37:11 -04:00
sir-dev.h
sir_dev.c net: remove interrupt.h inclusion from netdevice.h 2011-06-06 22:55:11 -07:00
sir_dongle.c
smsc-ircc2.c NET: smsc-ircc2: mark non-experimental 2012-04-27 00:03:35 -04:00
smsc-ircc2.h
smsc-sio.h
stir4200.c USB: stir4200.c: remove err() usage 2012-04-25 14:48:51 -07:00
tekram-sir.c
toim3232-sir.c treewide: transciever/transceiver spelling fixes 2011-06-24 11:20:14 +02:00
via-ircc.c drivers/net/irda/{ali-ircc, via-ircc, w83977af-ir}.c: ensure arguments to request_irq and free_irq are compatible 2012-03-11 15:41:18 -07:00
via-ircc.h drivers/net: Remove unnecessary semicolons 2011-06-05 14:33:40 -07:00
vlsi_ir.c net: remove interrupt.h inclusion from netdevice.h 2011-06-06 22:55:11 -07:00
vlsi_ir.h Fix common misspellings 2011-03-31 11:26:23 -03:00
w83977af.h
w83977af_ir.c drivers/net/irda/{ali-ircc, via-ircc, w83977af-ir}.c: ensure arguments to request_irq and free_irq are compatible 2012-03-11 15:41:18 -07:00
w83977af_ir.h