msm: kgsl: Don't read stale crashdumper data

After the crashdumper runs once, and the user sets the
snapshot_crashdumper sysfs node to 0, it is possible that stale data
is saved off into the snapshot. Check the value of the sysfs node at
the appropriate place to force a re-read of the data through the
legacy path.

Change-Id: Icf27c39b68d786003c33fd0eb22bd3e8b9a036be
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
diff --git a/drivers/gpu/msm/adreno_a6xx_snapshot.c b/drivers/gpu/msm/adreno_a6xx_snapshot.c
index 80c9a61..6269682 100644
--- a/drivers/gpu/msm/adreno_a6xx_snapshot.c
+++ b/drivers/gpu/msm/adreno_a6xx_snapshot.c
@@ -1519,6 +1519,8 @@
 
 	crash_dump_valid = false;
 
+	if (!device->snapshot_crashdumper)
+		return;
 	if (a6xx_capturescript.gpuaddr == 0 ||
 		a6xx_crashdump_registers.gpuaddr == 0)
 		return;