Staging: zram: Fix variable dereferenced before check
authorRashika Kheria <rashika.kheria@gmail.com>
Wed, 30 Oct 2013 13:13:32 +0000 (18:43 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Oct 2013 16:32:10 +0000 (09:32 -0700)
commit59d3fe540454dd8fc48d4eda44e200f9c98bef10
treed30d65677f0f645c0b961e753d42241e29b1f3e0
parent238822bc917be7d0d86101b5953704da89307067
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)

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