]> git.baikalelectronics.ru Git - kernel.git/commit
media: vimc: zero the media_device on probe
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Fri, 8 Mar 2019 13:02:26 +0000 (08:02 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 19 Mar 2019 17:30:32 +0000 (13:30 -0400)
commit5796088ff6f57455fa7e267650757c743a5fb698
treeece98a2aafca3a6cf39376beb2c2ab2e7f8ec00e
parentec504c66223326d483b69ad8b5ed4be413fa6d1d
media: vimc: zero the media_device on probe

The media_device is part of a static global vimc_device struct.
The media framework expects this to be zeroed before it is
used, however, since this is a global this is not the case if
vimc is unbound and then bound again.

So call memset to ensure any left-over values are cleared.

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-core.c