diff mbox

[PATCH/RFC,v2,2/8] dsbr100: fix potential use after free

Message ID 1274978356-25836-3-git-send-email-david@identd.dyndns.org (mailing list archive)
State RFC
Headers show

Commit Message

David Ellingsworth May 27, 2010, 4:39 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/radio/dsbr100.c b/drivers/media/radio/dsbr100.c
index 673eda8..2f96e13 100644
--- a/drivers/media/radio/dsbr100.c
+++ b/drivers/media/radio/dsbr100.c
@@ -354,8 +354,8 @@  static void usb_dsbr100_disconnect(struct usb_interface *intf)
 	radio->removed = 1;
 	mutex_unlock(&radio->lock);
 
-	video_unregister_device(&radio->videodev);
 	v4l2_device_disconnect(&radio->v4l2_dev);
+	video_unregister_device(&radio->videodev);
 }