Re: [PATCH 09/11] Input: sur40: fix error return code

2015-08-24 Thread Dmitry Torokhov
On Sun, Aug 23, 2015 at 02:11:20AM +0200, Julia Lawall wrote: > Propagate error code on failure. > > A simplified version of the semantic match that finds this problem is as > follows: (http://coccinelle.lip6.fr/) > > // > @@ > identifier ret; expression e1,e2; > @@ > ( > if (\(ret < 0\|ret !=

Re: [PATCH 09/11] Input: sur40: fix error return code

2015-08-24 Thread Dmitry Torokhov
On Sun, Aug 23, 2015 at 02:11:20AM +0200, Julia Lawall wrote: Propagate error code on failure. 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\|ret != 0\)) {

[PATCH 09/11] Input: sur40: fix error return code

2015-08-22 Thread Julia Lawall
Propagate error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = e1 when != *if(...) {

[PATCH 09/11] Input: sur40: fix error return code

2015-08-22 Thread Julia Lawall
Propagate error code on failure. 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\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = e1 when != ret