File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -870,19 +870,20 @@ static void iowarrior_disconnect(struct usb_interface *interface)
870
870
dev = usb_get_intfdata (interface );
871
871
mutex_lock (& iowarrior_open_disc_lock );
872
872
usb_set_intfdata (interface , NULL );
873
+ /* prevent device read, write and ioctl */
874
+ dev -> present = 0 ;
873
875
874
876
minor = dev -> minor ;
877
+ mutex_unlock (& iowarrior_open_disc_lock );
878
+ /* give back our minor - this will call close() locks need to be dropped at this point*/
875
879
876
- /* give back our minor */
877
880
usb_deregister_dev (interface , & iowarrior_class );
878
881
879
882
mutex_lock (& dev -> mutex );
880
883
881
884
/* prevent device read, write and ioctl */
882
- dev -> present = 0 ;
883
885
884
886
mutex_unlock (& dev -> mutex );
885
- mutex_unlock (& iowarrior_open_disc_lock );
886
887
887
888
if (dev -> opened ) {
888
889
/* There is a process that holds a filedescriptor to the device ,
You can’t perform that action at this time.
0 commit comments