]> www.infradead.org Git - users/dwmw2/linux.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>
Sun, 21 Aug 2022 13:16:04 +0000 (15:16 +0200)
commite2a4e46f52584e43cd0d9866752b51f588cc1173
treef426aea351e04bbeb760705caba177a2e36b6b26
parent3b973703229a1bc1b1f5174609bc6be73b80d2ae
opp: Fix error check in dev_pm_opp_attach_genpd()

[ Upstream commit 4ea9496cbc959eb5c78f3e379199aca9ef4e386b ]

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

Fixes: 6319aee10e53 ("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