Skip to content

Commit 1f8b66d

Browse files
committed
Merge branch 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm into pm-opp
Pull regression fix for the operating performance points (OPP) framework for v5.15 from Viresh Kumar: "This fixes regression in the OPP core for a corner case." * 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: opp: core: Check for pending links before reading required_opp pointers
2 parents e22ce8e + 19526d0 commit 1f8b66d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/opp/core.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,10 @@ static int _set_required_opps(struct device *dev,
893893
if (!required_opp_tables)
894894
return 0;
895895

896+
/* required-opps not fully initialized yet */
897+
if (lazy_linking_pending(opp_table))
898+
return -EBUSY;
899+
896900
/*
897901
* We only support genpd's OPPs in the "required-opps" for now, as we
898902
* don't know much about other use cases. Error out if the required OPP
@@ -903,10 +907,6 @@ static int _set_required_opps(struct device *dev,
903907
return -ENOENT;
904908
}
905909

906-
/* required-opps not fully initialized yet */
907-
if (lazy_linking_pending(opp_table))
908-
return -EBUSY;
909-
910910
/* Single genpd case */
911911
if (!genpd_virt_devs)
912912
return _set_required_opp(dev, dev, opp, 0);

0 commit comments

Comments
 (0)