Skip to content

Commit

Permalink
media: imx-jpeg: Fix the error handling path of 'mxc_jpeg_probe()'
Browse files Browse the repository at this point in the history
[ Upstream commit 5c47dc6 ]

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: 2db16c6 ("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>
  • Loading branch information
tititiou36 authored and gregkh committed Nov 18, 2021
1 parent 56bc844 commit 7b0b7b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/media/platform/imx-jpeg/mxc-jpeg.c
Expand Up @@ -2092,6 +2092,8 @@ static int mxc_jpeg_probe(struct platform_device *pdev)
v4l2_device_unregister(&jpeg->v4l2_dev);

err_register:
mxc_jpeg_detach_pm_domains(jpeg);

err_irq:
return ret;
}
Expand Down

0 comments on commit 7b0b7b8

Please sign in to comment.