]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
media: venus: core: Fix a resource leak in the error handling path of 'venus_probe()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 19 Aug 2021 20:05:28 +0000 (22:05 +0200)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 28 Jan 2022 09:59:19 +0000 (10:59 +0100)
commite76c41bedd2e7abdc04a9a525aa1ff70f7f0cbd9
tree252b12c0bae63a6f898deb65c912f2619b386eed
parent4f4f25762cbe427d77c43a4eb5f8acd29ae8ae15
media: venus: core: Fix a resource leak in the error handling path of 'venus_probe()'

BugLink: https://bugs.launchpad.net/bugs/1959376
[ Upstream commit 8cc7a1b2aca067397a016cdb971a5e6ad9b640c7 ]

A successful 'of_platform_populate()' call should be balanced by a
corresponding 'of_platform_depopulate()' call in the error handling path
of the probe, as already done in the remove function.

A successful 'venus_firmware_init()' call should be balanced by a
corresponding 'venus_firmware_deinit()' call in the error handling path
of the probe, as already done in the remove function.

Update the error handling path accordingly.

Fixes: f9799fcce4bb ("media: venus: firmware: register separate platform_device for firmware loader")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/media/platform/qcom/venus/core.c