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:
parent
24f9e652a5
commit
6a20f1c71f
|
|
@ -256,13 +256,13 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
list_for_each(node, &parts_head) {
|
||||
p = list_entry(node, struct rkparm_part, node);
|
||||
|
|
|
|||
Loading…
Reference in New Issue