Skip to content

Commit b5793af

Browse files
baruchsiachgregkh
authored andcommitted
of: base: Fix phandle argument length mismatch error message
[ Upstream commit 94a4950 ] The cell_count field of of_phandle_iterator is the number of cells we expect in the phandle arguments list when cells_name is missing. The error message should show the number of cells we actually see. Fixes: af3be70 ("of: Improve of_phandle_iterator_next() error message") Cc: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/96519ac55be90a63fa44afe01480c30d08535465.1640881913.git.baruch@tkos.co.il Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent e16e836 commit b5793af

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/of/base.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,9 +1328,9 @@ int of_phandle_iterator_next(struct of_phandle_iterator *it)
13281328
* property data length
13291329
*/
13301330
if (it->cur + count > it->list_end) {
1331-
pr_err("%pOF: %s = %d found %d\n",
1331+
pr_err("%pOF: %s = %d found %td\n",
13321332
it->parent, it->cells_name,
1333-
count, it->cell_count);
1333+
count, it->list_end - it->cur);
13341334
goto err;
13351335
}
13361336
}

0 commit comments

Comments
 (0)