Commit 6ce2da37 authored by Tang Bin's avatar Tang Bin Committed by Zheng Zengkai
Browse files

opp: Fix error check in dev_pm_opp_attach_genpd()

stable inclusion
from stable-v5.10.137
commit e2a4e46f52584e43cd0d9866752b51f588cc1173
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e2a4e46f52584e43cd0d9866752b51f588cc1173



--------------------------------

[ Upstream commit 4ea9496c ]

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

Fixes: 6319aee1 ("opp: Attach genpds to devices from within OPP core")
Signed-off-by: default avatarTang Bin <tangbin@cmss.chinamobile.com>
[ Viresh: Replace ENODATA with ENODEV ]
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent a4e9d064
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment