Julia Lawall 201c7b72f0 zram: fix error return code
Return a negative 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
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Acked-by: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-15 16:35:22 -07:00
..
2015-04-15 16:35:22 -07:00
2015-02-16 17:56:04 -08:00
2013-04-09 14:13:19 -04:00
2014-08-08 15:57:28 -07:00
2011-08-08 11:40:15 +02:00
2014-08-08 15:57:28 -07:00
2015-02-16 17:56:04 -08:00
2015-01-02 15:20:25 -07:00
2015-01-02 15:20:25 -07:00
2014-01-30 16:56:55 -08:00
2015-03-05 08:51:03 +01:00
2015-02-19 14:27:42 +03:00
2013-11-08 09:10:30 -07:00
2009-03-26 21:15:27 +01:00
2015-01-21 16:28:57 +10:30