platform: msm_shared: Add slot_is_sucessful check, before switch_slot

Along with slot_is_bootable, add slot_is_sucessful check before
partition_switch_slots.

Change-Id: I0a017f63c8a3d1b61d5027eb12fca1310921e6bb
Signed-off-by: Rahul Shahare <rshaha@codeaurora.org>
diff --git a/platform/msm_shared/ab_partition_parser.c b/platform/msm_shared/ab_partition_parser.c
index 53a671c..1324e30 100644
--- a/platform/msm_shared/ab_partition_parser.c
+++ b/platform/msm_shared/ab_partition_parser.c
@@ -360,7 +360,8 @@
 	for (i = 0; i < AB_SUPPORTED_SLOTS; i++)
 	{
 		slt_index = boot_slot_index[i];
-		if (slot_is_bootable(ptn_entry, slt_index))
+		if (slot_is_bootable(ptn_entry, slt_index) &&
+					slot_is_sucessful(ptn_entry, slt_index))
 			return i;
 	}