Skip to content
Commit 94b9ce68 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Mauro Carvalho Chehab
Browse files

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: 5ce60d79 ("[media] s5p-g2d: Add DT based discovery support")
Fixes: 91884734 ("[media] v4l: add G2D driver for s5p device family")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil-cisco@xs4all.nl: checkpatch: align with parenthesis]
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent b3ab1c60
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment