]> git.baikalelectronics.ru Git - kernel.git/commit
opp: Fix error check in dev_pm_opp_attach_genpd()
authorTang Bin <tangbin@cmss.chinamobile.com>
Tue, 24 May 2022 12:31:51 +0000 (20:31 +0800)
committerViresh Kumar <viresh.kumar@linaro.org>
Mon, 6 Jun 2022 06:28:51 +0000 (11:58 +0530)
commit6d935a10e2f19d8102ebc56c731a5bf07c373815
tree0216f4fe0f321d26a9da8109d983f575cb15fc2d
parentf040cca4b0da0180bf9de9141ef5c95f60f85182
opp: Fix error check in dev_pm_opp_attach_genpd()

dev_pm_domain_attach_by_name() may return NULL in some cases,
so IS_ERR() doesn't meet the requirements. Thus fix it.

Fixes: 2d395697182c ("opp: Attach genpds to devices from within OPP core")
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
[ Viresh: Replace ENODATA with ENODEV ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/core.c