diag: Fix ordering of pointer checks and dereferences

DIAG driver was performing some NULL pointer checks incorrectly.
This change fixes the order of performing the NULL pointer
checks.

Change-Id: Iac2966d0e9abac3e4588838ab9900b0ba09b7af9
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
1 file changed