zram: avoid null access when fail to alloc meta
authorMinchan Kim <minchan@kernel.org>
Mon, 3 Mar 2014 23:38:34 +0000 (15:38 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 4 Mar 2014 15:55:49 +0000 (07:55 -0800)
commitdb5d711e2db776f18219b033e5dc4fb7e4264dd7
tree72ec07e68fc23f32d7a30ced01ab4c6ee13384c0
parenta5f6ea29f9a918403629f8369ae55fac6b09cb53
zram: avoid null access when fail to alloc meta

zram_meta_alloc could fail so caller should check it.  Otherwise, your
system will hang.

Signed-off-by: Minchan Kim <minchan@kernel.org>
Acked-by: Jerome Marchand <jmarchan@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/zram/zram_drv.c