]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
media: imx-jpeg: Fix the error handling path of 'mxc_jpeg_probe()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 21 Aug 2021 11:12:53 +0000 (13:12 +0200)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:48:21 +0000 (09:48 +0100)
BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit 5c47dc6657543b3c4dffcbe741fb693b9b96796d ]

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

Update the error handling path accordingly.

Fixes: 2db16c6ed72c ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
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/imx-jpeg/mxc-jpeg.c

index 33e7604271cdfa139a91fb3497ec91074e3ad37a..fc905ea78b175319eab9a0283a297f576f55400d 100644 (file)
@@ -2092,6 +2092,8 @@ err_m2m:
        v4l2_device_unregister(&jpeg->v4l2_dev);
 
 err_register:
+       mxc_jpeg_detach_pm_domains(jpeg);
+
 err_irq:
        return ret;
 }