projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6880fa6
)
opp: Fix required-opps phandle array count check
author
Pavankumar Kondeti
<pkondeti@codeaurora.org>
Thu, 30 Sep 2021 10:09:08 +0000
(15:39 +0530)
committer
Viresh Kumar
<viresh.kumar@linaro.org>
Mon, 4 Oct 2021 06:53:09 +0000
(12:23 +0530)
The 'required-opps' property is optional. So of_count_phandle_with_args()
can return -ENOENT when queried for required-opps. Handle this case.
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/of.c
patch
|
blob
|
history
diff --git
a/drivers/opp/of.c
b/drivers/opp/of.c
index 2a97c6535c4c6e29ea47b1b2494f53d9c2342c36..5437085fb3809a495dd8190df244a0fa4ff6909c 100644
(file)
--- a/
drivers/opp/of.c
+++ b/
drivers/opp/of.c
@@
-170,7
+170,7
@@
static void _opp_table_alloc_required_tables(struct opp_table *opp_table,
}
count = of_count_phandle_with_args(np, "required-opps", NULL);
- if (
!count
)
+ if (
count <= 0
)
goto put_np;
required_opp_tables = kcalloc(count, sizeof(*required_opp_tables),