media: staging: media: zoran: move videodev alloc
authorCorentin Labbe <clabbe@baylibre.com>
Tue, 14 Dec 2021 16:16:26 +0000 (17:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:23:58 +0000 (14:23 +0200)
commitff3357bffd9fb78f59762d8955afc7382a279079
tree2b79be44ce2f98964ce0b771d6778ec9100f3b87
parent24ab2d4ef52c2dbb62a60844b87fc8872383407a
media: staging: media: zoran: move videodev alloc

[ Upstream commit 82e3a496eb56da0b9f29fdc5b63cedb3289e91de ]

Move some code out of zr36057_init() and create new functions for handling
zr->video_dev. This permit to ease code reading and fix a zr->video_dev
memory leak.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/media/zoran/zoran.h
drivers/staging/media/zoran/zoran_card.c
drivers/staging/media/zoran/zoran_driver.c