media: pvrusb2: fix uaf in pvr2_context_set_notify
[linux-2.6-microblaze.git] / drivers / media / usb / pvrusb2 / pvrusb2-context.c
index 58f2f3f..73c95ba 100644 (file)
@@ -267,9 +267,9 @@ static void pvr2_context_exit(struct pvr2_context *mp)
 void pvr2_context_disconnect(struct pvr2_context *mp)
 {
        pvr2_hdw_disconnect(mp->hdw);
-       mp->disconnect_flag = !0;
        if (!pvr2_context_shutok())
                pvr2_context_notify(mp);
+       mp->disconnect_flag = !0;
 }