summaryrefslogtreecommitdiff
path: root/drivers/opp/of.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-09-09 19:03:00 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-09-09 19:03:00 +0200
commite06cb12e1ebf1a3bb3473e1b96991d71d4ba4489 (patch)
treee1a1a95dc5f693ce5732a922ee80abe20678b120 /drivers/opp/of.c
parentdf2908090cda368b01ff43709f51890076c56157 (diff)
parent1f6de65e3314519ce462bfd3a1d29e918f97e4e5 (diff)
Merge tag 'opp-updates-7.3.rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm
Merge OPP updates for 7.3-rc3 from Viresh Kumar: "- Fix potential multiplication overflow when calculating freq in OPP core (Colin Ian King). - Fix use after free in _update_opp_table_clk() (Peter Griffin). - Use %pe to print symbolic error name (Sumeet Pawnikar)." * tag 'opp-updates-7.3.rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: opp: fix use after free in _update_opp_table_clk() opp: Use %pe to print symbolic error name OPP: of: Fix potential multiplication overflow when calculating freq
Diffstat (limited to 'drivers/opp/of.c')
-rw-r--r--drivers/opp/of.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/opp/of.c b/drivers/opp/of.c
index c02e20632fa6..2f3bbde9a9e1 100644
--- a/drivers/opp/of.c
+++ b/drivers/opp/of.c
@@ -1039,7 +1039,7 @@ static int _of_add_opp_table_v1(struct device *dev, struct opp_table *opp_table)
val = prop->value;
while (nr) {
- unsigned long freq = be32_to_cpup(val++) * 1000;
+ unsigned long freq = (unsigned long)be32_to_cpup(val++) * 1000;
unsigned long volt = be32_to_cpup(val++);
struct dev_pm_opp_data data = {
.freq = freq,
@@ -1345,8 +1345,8 @@ int of_get_required_opp_performance_state(struct device_node *np, int index)
_find_table_of_opp_np(required_np);
if (IS_ERR(opp_table)) {
- pr_err("%s: Failed to find required OPP table %pOF: %ld\n",
- __func__, np, PTR_ERR(opp_table));
+ pr_err("%s: Failed to find required OPP table %pOF: %pe\n",
+ __func__, np, opp_table);
return PTR_ERR(opp_table);
}