Commit 0f6e8d8c authored by Tang Bin's avatar Tang Bin Committed by Stanimir Varbanov

venus: pm_helpers: Fix error check in vcodec_domains_get()

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: 7482a983 ("media: venus: redesign clocks and pm domains control")
Signed-off-by: default avatarTang Bin <tangbin@cmss.chinamobile.com>
parent 1eee6bb9
......@@ -869,8 +869,8 @@ static int vcodec_domains_get(struct venus_core *core)
for (i = 0; i < res->vcodec_pmdomains_num; i++) {
pd = dev_pm_domain_attach_by_name(dev,
res->vcodec_pmdomains[i]);
if (IS_ERR(pd))
return PTR_ERR(pd);
if (IS_ERR_OR_NULL(pd))
return PTR_ERR(pd) ? : -ENODATA;
core->pmdomains[i] = pd;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment