venus: pm_helpers: Fix error check in vcodec_domains_get()
authorTang Bin <tangbin@cmss.chinamobile.com>
Tue, 13 Sep 2022 06:37:00 +0000 (14:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:04 +0000 (13:32 +0100)
commita5514f2f83a1a36e698c4bfdc25875ba0e3b5b5d
treef7921fec6a2a7511a71afb3127df0e6dd90a79c3
parent0a132a42b77ff0cd12ef9b6efb2d7dab4f6ffc12
venus: pm_helpers: Fix error check in vcodec_domains_get()

[ Upstream commit 0f6e8d8c94a82e85e1b9b62a7671990740dc6f70 ]

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: 7482a983dea3 ("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>
drivers/media/platform/qcom/venus/pm_helpers.c