OpenCloudOS-Kernel/drivers/media/platform/s5p-g2d
Christophe JAILLET 94b9ce6870 media: s5p-g2d: Fix a memory leak in an error handling path in 'g2d_probe()'
Memory allocated with 'v4l2_m2m_init()' must be freed by a corresponding
call to 'v4l2_m2m_release()'

Also reorder the code at the end of the probe function so that
'video_register_device()' is called last.
Update the error handling path accordingly.

Fixes: 5ce60d790a ("[media] s5p-g2d: Add DT based discovery support")
Fixes: 918847341a ("[media] v4l: add G2D driver for s5p device family")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil-cisco@xs4all.nl: checkpatch: align with parenthesis]
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-07-19 08:14:00 +02:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
g2d-hw.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
g2d-regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
g2d.c media: s5p-g2d: Fix a memory leak in an error handling path in 'g2d_probe()' 2020-07-19 08:14:00 +02:00
g2d.h media: media/platform: don't set description in ENUM_FMT 2019-07-22 14:43:59 -04:00