msm: kgsl: Avoid dereferencing NULL pointers

It is possible to drop to the bottom of adreno_ringbuffer_issuecmds
with either context or drawctxt set to NULL. Avoid dereferencing these
variables in the trace call at the bottom of the function.

Change-Id: Ic0dedbadbc7e2c0c4ef85e0d7103e04485ed3e69
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
diff --git a/drivers/gpu/msm/adreno_ringbuffer.c b/drivers/gpu/msm/adreno_ringbuffer.c
index 4247f73..5236d33 100644
--- a/drivers/gpu/msm/adreno_ringbuffer.c
+++ b/drivers/gpu/msm/adreno_ringbuffer.c
@@ -1097,8 +1097,9 @@
 	}
 
 done:
-	kgsl_trace_issueibcmds(device, context->id, ibdesc, numibs,
-		*timestamp, flags, ret, drawctxt->type);
+	kgsl_trace_issueibcmds(device, context ? context->id : 0, ibdesc,
+		numibs, *timestamp, flags, ret,
+		drawctxt ? drawctxt->type : 0);
 
 	kfree(link);
 	return ret;