disk: rkparm: check return value only when do initialization

Change-Id: Id2f9e6a7c5843e5d277a70797c4a3a2768230c14
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
Joseph Chen 2019-06-24 12:05:21 +08:00 committed by Jianhong Chen
parent 24f9e652a5
commit 6a20f1c71f
1 changed files with 5 additions and 5 deletions

View File

@ -256,12 +256,12 @@ static int part_get_info_rkparm(struct blk_desc *dev_desc, int idx,
}
if (list_empty(&parts_head) ||
(dev_num != ((dev_desc->if_type << 8) + dev_desc->devnum)))
(dev_num != ((dev_desc->if_type << 8) + dev_desc->devnum))) {
ret = rkparm_init_param(dev_desc, &parts_head);
if (ret) {
printf("%s Invalid rkparm partition\n", __func__);
return -1;
if (ret) {
printf("%s Invalid rkparm partition\n", __func__);
return -1;
}
}
list_for_each(node, &parts_head) {