Skip to content
Commit 236c5441 authored by Dave Young's avatar Dave Young Committed by Mauro Carvalho Chehab
Browse files

[media] v4l: Make sure we hold a reference to the v4l2_device before using it



v4l2_device_disconnect() calls dev_get_drvdata() and dev_set_drvdata()
on the device it received in v4l2_device_register(). Get a reference to
the device in v4l2_device_register() to make sure it won't disappear as
long as we need it.

Reported-by: default avatarSitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: default avatarDave Young <hidave.darkstar@gmail.com>
Tested-by: default avatarSitsofe Wheeler <sitsofe@yahoo.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 8280b662
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment