msm: kgsl: Check for valid pointer before dereferencing

Check to make sure that there is a valid context pointer before
dereferencing it when adding commands to the ringbuffer.

Change-Id: Icf9824de8f62a28cdeeef4378246d9fb334d39fa
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>

Conflicts:
	drivers/gpu/msm/adreno_ringbuffer.c