diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2020-12-09 11:24:12 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2020-12-09 11:24:12 +0530 |
commit | 2c07b0fd9bf6dfb0bdf05aac018e6b3242d60822 (patch) | |
tree | ba2791aafec26123a0d5df29de2533a7adbfae8c /drivers/opp | |
parent | e91e3d902b76c3f2a238873a17958080af018f08 (diff) | |
parent | 6ee70e8c34e37a34f4dc2c8bc06febffd375fac4 (diff) | |
download | lwn-2c07b0fd9bf6dfb0bdf05aac018e6b3242d60822.tar.gz lwn-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; |