linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] fix error return code
@ 2012-08-17  7:46 Julia Lawall
  2012-08-17  7:46 ` [PATCH 1/3] drivers/net/wimax/i2400m/fw.c: " Julia Lawall
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Julia Lawall @ 2012-08-17  7:46 UTC (permalink / raw)
  To: netdev; +Cc: kernel-janitors, linux-kernel

These patches fix cases where the return code appears to be unintentially
nonnegative.

The complete semantic match that finds the problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier ret,l;
expression e1,e2,e3;
statement S;
@@

if (ret < 0)
 { ... return ret; }
... when != ret = e1
    when forall
(
 goto l;
|
 return ...;
|
 if (<+... ret = e3 ...+>) S
|
*if(...)
 {
  ... when != ret = e2
* return ret;
}
)
// </smpl>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-20  9:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-17  7:46 [PATCH 0/3] fix error return code Julia Lawall
2012-08-17  7:46 ` [PATCH 1/3] drivers/net/wimax/i2400m/fw.c: " Julia Lawall
2012-08-17  7:46 ` [PATCH 2/3] drivers/net/wan/dscc4.c: " Julia Lawall
2012-08-17  7:46 ` [PATCH 3/3] drivers/net/irda: " Julia Lawall
2012-08-20  9:33 ` [PATCH 0/3] " David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).