9x15/nand: Fixing up len from SMEM ptable

The length of the grow partition does not get updated
for nand during flashing. Need to update it with the
actual end of the device for grow partition.

Change-Id: I0b66d891ea3c67bb306ed384ba46093b13f1c020
diff --git a/target/mdm9615/init.c b/target/mdm9615/init.c
index 3788bc3..ed569bc 100644
--- a/target/mdm9615/init.c
+++ b/target/mdm9615/init.c
@@ -215,4 +215,14 @@
 			name_size = strlen(ptable_ptn_names[name_index]);
 		}
 	}
+
+	/* Update the end to be actual end for grow partition */
+	ptn_index--;
+	for (;ptentry_ptr[ptn_index].length != end; ptn_index++){};
+
+	/* If SMEM ptable is updated already then don't manually update this */
+	if (ptentry_ptr[ptn_index].start != end)
+		ptentry_ptr[ptn_index].length =
+			((struct flash_info*)flash_get_info())->num_blocks -
+			ptentry_ptr[ptn_index].start;
 }