linux/drivers/block/zram
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
..
Kconfig
Makefile
zcomp_lz4.c
zcomp_lz4.h
zcomp_lzo.c
zcomp_lzo.h
zcomp.c zram: use scnprintf() in attrs show() methods 2014-04-07 16:36:02 -07:00
zcomp.h
zram_drv.c zram: fix error return code 2015-04-15 16:35:22 -07:00
zram_drv.h zram: support compaction 2015-04-15 16:35:21 -07:00