Staging: zram: Fix variable dereferenced before check
authorRashika Kheria <rashika.kheria@gmail.com>
Wed, 30 Oct 2013 13:13:32 +0000 (18:43 +0530)
committerChanho Park <chanho61.park@samsung.com>
Thu, 20 Mar 2014 08:44:30 +0000 (17:44 +0900)
commitbad433ba1451933e24bb52ebf051a13d39224091
treefa8953d6c107a010da8243810e9587932721a9a6
parente8ed73197ecb6e2fd9c7d039d2317e642dbe54bc
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