venus: pm_helpers: Fix error check in vcodec_domains_get()
[ Upstream commit0f6e8d8c94] In the function vcodec_domains_get(), dev_pm_domain_attach_by_name() may return NULL in some cases, so IS_ERR() doesn't meet the requirements. Thus fix it. Fixes:7482a983de("media: venus: redesign clocks and pm domains control") Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
86d531c1d7
commit
4882492ad3
@@ -764,8 +764,8 @@ static int vcodec_domains_get(struct venus_core *core)
|
|||||||
for (i = 0; i < res->vcodec_pmdomains_num; i++) {
|
for (i = 0; i < res->vcodec_pmdomains_num; i++) {
|
||||||
pd = dev_pm_domain_attach_by_name(dev,
|
pd = dev_pm_domain_attach_by_name(dev,
|
||||||
res->vcodec_pmdomains[i]);
|
res->vcodec_pmdomains[i]);
|
||||||
if (IS_ERR(pd))
|
if (IS_ERR_OR_NULL(pd))
|
||||||
return PTR_ERR(pd);
|
return PTR_ERR(pd) ? : -ENODATA;
|
||||||
core->pmdomains[i] = pd;
|
core->pmdomains[i] = pd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user