aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-si470x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/radio/radio-si470x.c')
-rw-r--r--drivers/media/radio/radio-si470x.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/radio/radio-si470x.c b/drivers/media/radio/radio-si470x.c
index a2975c8..7fdee3c 100644
--- a/drivers/media/radio/radio-si470x.c
+++ b/drivers/media/radio/radio-si470x.c
@@ -1439,11 +1439,10 @@ static void si470x_usb_driver_disconnect(struct usb_interface *intf)
{
struct si470x_device *radio = usb_get_intfdata(intf);
- del_timer_sync(&radio->timer);
- flush_scheduled_work();
-
usb_set_intfdata(intf, NULL);
if (radio) {
+ del_timer_sync(&radio->timer);
+ flush_scheduled_work();
video_unregister_device(radio->videodev);
kfree(radio->buffer);
kfree(radio);