aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/of/base.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 4f884a358a7..cf04d4dd4a5 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -547,14 +547,12 @@ int of_parse_phandles_with_args(struct device_node *np, const char *list_name,
547 const u32 *cells; 547 const u32 *cells;
548 const phandle *phandle; 548 const phandle *phandle;
549 549
550 phandle = list; 550 phandle = list++;
551 args = list + 1; 551 args = list;
552 552
553 /* one cell hole in the list = <>; */ 553 /* one cell hole in the list = <>; */
554 if (!*phandle) { 554 if (!*phandle)
555 list++;
556 goto next; 555 goto next;
557 }
558 556
559 node = of_find_node_by_phandle(*phandle); 557 node = of_find_node_by_phandle(*phandle);
560 if (!node) { 558 if (!node) {
@@ -570,8 +568,7 @@ int of_parse_phandles_with_args(struct device_node *np, const char *list_name,
570 goto err1; 568 goto err1;
571 } 569 }
572 570
573 /* Next phandle is at offset of one phandle cell + #cells */ 571 list += *cells;
574 list += 1 + *cells;
575 if (list > list_end) { 572 if (list > list_end) {
576 pr_debug("%s: insufficient arguments length\n", 573 pr_debug("%s: insufficient arguments length\n",
577 np->full_name); 574 np->full_name);