[media] v4l2-dev: don't memset video_device.dev
commit46b633779b299c7fb3d78f153a5034055f99cd45
authorHans Verkuil <hverkuil@xs4all.nl>
Fri, 31 Dec 2010 14:47:23 +0000 (31 11:47 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 19 Jan 2011 13:52:13 +0000 (19 11:52 -0200)
tree45db9a1313d43a9438f105f3d257cc592cf050a6
parent6ce3ced4f73e3f0c345f47dc99fd21f2248724a8
[media] v4l2-dev: don't memset video_device.dev

Zeroing video_device.dev causes a memory leak if video_set_drvdata
was called before video_register_device was called. video_set_drvdata
calls dev_set_drvdata which allocates video_device.dev.p.

memsetting this will prevent freeing of that memory.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/v4l2-dev.c