]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:18:00 +0000 (11:18 +0200)
commit9ba6b69a250ed75d8d32be61dd5f7abb9ac738b6
tree847ed0ec4d6f4e1c41c855072f45ce800afb68ee
parent2d6a1566cbcd5ca60f85d7bfa4db364555876dea
opp: Fix error check in dev_pm_opp_attach_genpd()

[ Upstream commit 6d935a10e2f19d8102ebc56c731a5bf07c373815 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/opp/core.c