Merge "platform: msm_shared: Support glink and smd simultaneously."
diff --git a/platform/mdm9640/platform.c b/platform/mdm9640/platform.c
index db301ee..fd866a4 100644
--- a/platform/mdm9640/platform.c
+++ b/platform/mdm9640/platform.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -183,7 +183,8 @@
switch(platform_id)
{
- case SDXHEDGEHOG:
+ case SDXHEDGEHOG1:
+ case SDXHEDGEHOG2:
ret = true;
break;
default:
diff --git a/platform/msm_shared/smem.h b/platform/msm_shared/smem.h
index 4da7b31..fc2fc8f 100644
--- a/platform/msm_shared/smem.h
+++ b/platform/msm_shared/smem.h
@@ -2,7 +2,7 @@
* Copyright (c) 2009, Google Inc.
* All rights reserved.
*
- * Copyright (c) 2009-2016, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2009-2017, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -459,7 +459,8 @@
MSM8996AU = 310,
APQ8096AU = 311,
APQ8096SG = 312,
- SDXHEDGEHOG = 314
+ SDXHEDGEHOG1 = 314,
+ SDXHEDGEHOG2 = 333
};
enum platform {
diff --git a/target/mdm9607/init.c b/target/mdm9607/init.c
index b59b7b9..4145588 100644
--- a/target/mdm9607/init.c
+++ b/target/mdm9607/init.c
@@ -257,6 +257,11 @@
int system_ptn_index = -1;
uint32_t buflen = strlen(UBI_CMDLINE) + strlen(" root=ubi0:rootfs ubi.mtd=") + sizeof(int) + 1; /* 1 byte for null character*/
+ if (!cmdline || !part ) {
+ dprintf(CRITICAL, "WARN: Invalid input param\n");
+ return -1;
+ }
+
*buf = (char *)malloc(buflen);
if(!(*buf)) {
dprintf(CRITICAL,"Unable to allocate memory for boot params\n");