Merge "diag: Null pointer check to avoid kernel panic" into msm-4.9