hal : Validate input to fix NULL check error
-Validate input param to avoid NULL check error
Change-Id: Ied070903cc66346f14c33283aedf39b75e02fe93
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index 9710f59..fc461ce 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -1824,7 +1824,7 @@
int wsa_count = 0;
/* SL/SH hardware always has wsa by default, no need to add wsa */
- if(!strncmp(snd_card_name, "sdm660", strlen("sdm660"))) {
+ if(snd_card_name && !strncmp(snd_card_name, "sdm660", strlen("sdm660"))) {
ALOGD(" Ignore WSA extension for sdm 660 varients");
return false;
}