]> git.baikalelectronics.ru Git - kernel.git/commit
media: vimc: free vimc_cap_device when the last user disappears
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 21 Feb 2019 13:47:28 +0000 (08:47 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 19 Mar 2019 17:31:37 +0000 (13:31 -0400)
commit12fd835afe4c8b77b38f4ec18c1352e35303c0a7
treedc4b31a232ce48d5e144ca9f6a5c13e37b8e33f2
parent5796088ff6f57455fa7e267650757c743a5fb698
media: vimc: free vimc_cap_device when the last user disappears

Don't free vimc_cap_device immediately, instead do this
in the video_device release function which is called when the
last user closes the video device. Only then is it safe to
free the memory.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vimc/vimc-capture.c