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,12 +256,12 @@ static int part_get_info_rkparm(struct blk_desc *dev_desc, int idx,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list_empty(&parts_head) ||
|
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);
|
ret = rkparm_init_param(dev_desc, &parts_head);
|
||||||
|
if (ret) {
|
||||||
if (ret) {
|
printf("%s Invalid rkparm partition\n", __func__);
|
||||||
printf("%s Invalid rkparm partition\n", __func__);
|
return -1;
|
||||||
return -1;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
list_for_each(node, &parts_head) {
|
list_for_each(node, &parts_head) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue