Staging: zram: Fix variable dereferenced before check
authorRashika Kheria <rashika.kheria@gmail.com>
Wed, 30 Oct 2013 13:13:32 +0000 (18:43 +0530)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 15 May 2014 05:27:58 +0000 (07:27 +0200)
commit11b7ec00af8412e043bb84016b7d85670f2459fd
tree32f167550672e4250bc427a0eca0b9e44d59b923
parent38090963c6fa410b8896bbfca9c053fcb2dcb3bf
Staging: zram: Fix variable dereferenced before check

This patch fixes the following Smatch warning in zram_drv.c-
drivers/staging/zram/zram_drv.c:899
destroy_device() warn: variable dereferenced before check 'zram->disk' (see line 896)

Change-Id: If920cb9e1328289c561de89e074523071cd772b5
Acked-by: Minchan Kim <minchan@kernel.org>
Acked-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/zram/zram_drv.c