OSDN Git Service

media: DaVinci-VPBE: fix error handling in vpbe_initialize()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 23 Nov 2018 21:56:26 +0000 (16:56 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 3 Dec 2018 19:39:43 +0000 (14:39 -0500)
commitaa35dc3c71950e3fec3e230c06c27c0fbd0067f8
tree09f55bbd0a3d677213dc559f03a9f6decafc3c2a
parentadcfdbde20dc149084978d4c9efa0a106e73f17e
media: DaVinci-VPBE: fix error handling in vpbe_initialize()

If vpbe_set_default_output() or vpbe_set_default_mode() fails,
vpbe_initialize() returns error code without releasing resources.

The patch adds error handling for that case.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/davinci/vpbe.c