diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2020-12-09 06:54:12 +0100 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2020-12-09 06:54:12 +0100 |
commit | 2c07b0fd9bf6dfb0bdf05aac018e6b3242d60822 (patch) | |
tree | ba2791aafec26123a0d5df29de2533a7adbfae8c /drivers/opp | |
parent | media: venus: dev_pm_opp_put_*() accepts NULL argument (diff) | |
parent | opp: of: Allow empty opp-table with opp-shared (diff) | |
download | linux-2c07b0fd9bf6dfb0bdf05aac018e6b3242d60822.tar.xz linux-2c07b0fd9bf6dfb0bdf05aac018e6b3242d60822.zip |
Merge branch 'opp/empty' into opp/linux-next
Diffstat (limited to 'drivers/opp')
-rw-r--r-- | drivers/opp/of.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/opp/of.c b/drivers/opp/of.c index 6b7f0066942d..d41088578aab 100644 --- a/drivers/opp/of.c +++ b/drivers/opp/of.c @@ -170,7 +170,8 @@ static void _opp_table_alloc_required_tables(struct opp_table *opp_table, /* Traversing the first OPP node is all we need */ np = of_get_next_available_child(opp_np, NULL); if (!np) { - dev_err(dev, "Empty OPP table\n"); + dev_warn(dev, "Empty OPP table\n"); + return; } @@ -378,7 +379,9 @@ int dev_pm_opp_of_find_icc_paths(struct device *dev, struct icc_path **paths; ret = _bandwidth_supported(dev, opp_table); - if (ret <= 0) + if (ret == -EINVAL) + return 0; /* Empty OPP table is a valid corner-case, let's not fail */ + else if (ret <= 0) return ret; ret = 0; |