• Hans Verkuil's avatar
    V4L/DVB: hdpvr: fix disconnect sequence · f2b305cd
    Hans Verkuil authored
    Disconnecting the HDPVR caused a kernel oops if lockdep was enabled.
    In addition, if an app still had video0 open and attempted to call ioctl
    when the device was already disconnected the system would crash.
    
    Move the freeing and cleanup code to the release function: that is the
    right place for it since you know when you get there that nobody is
    using the device.
    
    Also removed usb_set_intfdata: v4l2_device_register sets this already
    to v4l2_dev.
    Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
    f2b305cd
hdpvr-core.c 11.5 KB