drivers/net/irda: fix error return code
authorJulia Lawall <Julia.Lawall@lip6.fr>
Thu, 16 Aug 2012 21:46:58 +0000 (21:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Aug 2012 09:33:21 +0000 (02:33 -0700)
commit9915e67eb1134b4710a4888a3e041c757869e0e2
tree65703e668603fc428264d0fc39c32999efd9c80f
parent623d896b361f404de5ed24e312a58646ee04207d
drivers/net/irda: fix error return code

Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier ret;
expression e1,e2;
@@

if (ret < 0)
 { ... return ret; }
 ... when != ret = e1
     when forall
*if(...)
 {
  ... when != ret = e2
* return ret;
 }
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/irda/ks959-sir.c
drivers/net/irda/ksdazzle-sir.c