V4L/DVB (13067): radio-mr800: fix potential use after free
authorDavid Ellingsworth <david@identd.dyndns.org>
Wed, 23 Sep 2009 21:03:52 +0000 (18:03 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 5 Dec 2009 20:40:10 +0000 (18:40 -0200)
Fix portential use after free.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/radio/radio-mr800.c

index c4f4cd8dbb6c03d4449a29fb7bacdea19c815092..dbae50ba250c827cc91c1151baf85d358c1c6b3f 100644 (file)
@@ -273,8 +273,8 @@ static void usb_amradio_disconnect(struct usb_interface *intf)
        mutex_unlock(&radio->lock);
 
        usb_set_intfdata(intf, NULL);
-       video_unregister_device(&radio->videodev);
        v4l2_device_disconnect(&radio->v4l2_dev);
+       video_unregister_device(&radio->videodev);
 }
 
 /* vidioc_querycap - query device capabilities */