]> 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>
Wed, 17 Aug 2022 12:24:01 +0000 (14:24 +0200)
commitebeb95ae85020360990a26f11c94e0dfe808a480
treea730881122146662ca26bf361a3fae1b3708250f
parentb605f06c61a7022b1b5e9d13018ca0cfd793f166
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