]> git.baikalelectronics.ru Git - kernel.git/commit
media: vivid: two unregistration fixes
authorHans Verkuil <hverkuil@xs4all.nl>
Sun, 17 Feb 2019 14:12:41 +0000 (09:12 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 18 Feb 2019 17:31:58 +0000 (12:31 -0500)
commit0320a7f11045497938f63ad772eb44ce81b64f77
tree798b29149d1d105d302b1ac7cf178c0e94687d4a
parentaa9bf2185d7212a0a8dc1325f292a50a9b1f02bd
media: vivid: two unregistration fixes

When the media device registration fails, don't call media_device_unregister
since the device was never actually registered.

When removing the module also call media_device_cleanup() to avoid a memory leak.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vivid/vivid-core.c