media: vimc: streamer: fix memory leak in vimc subdevs if kthread_run fails
authorDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Mon, 13 Jan 2020 18:59:33 +0000 (19:59 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 24 Feb 2020 15:16:20 +0000 (16:16 +0100)
commitceeb2e6166dddf3c9757abbbf84032027e2fa2d2
tree1a422c08a75e7f244c34acbd608459b5ee18ae4e
parent23c72dd9ffd22d8a17ec1b432eafa4caf3d8ccb6
media: vimc: streamer: fix memory leak in vimc subdevs if kthread_run fails

In case kthread_run fails, the vimc subdevices
should be notified that streaming stopped so they can
release the memory for the streaming. Also, kthread should be
set to NULL.

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/vimc/vimc-streamer.c