android: return fail if not found misc partition

Return directly and do not continue read from misc partition
if there is no partition.

Change-Id: I549d123632aecc5bd29ebdc2c4c7917c76750247
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
Kever Yang 2019-02-14 11:21:23 +08:00
parent 644804ed62
commit fd810b8003
1 changed files with 3 additions and 1 deletions

View File

@ -893,8 +893,10 @@ int android_bootloader_boot_flow(struct blk_desc *dev_desc,
*/
part_num = part_get_info_by_name(dev_desc, ANDROID_PARTITION_MISC,
&misc_part_info);
if (part_num < 0)
if (part_num < 0) {
printf("%s Could not find misc partition\n", __func__);
return -ENODEV;
}
#ifdef CONFIG_ANDROID_KEYMASTER_CA
/* load attestation key from misc partition. */