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 @@ -866,19 +866,20 @@ static void iowarrior_disconnect(struct usb_interface *interface)
866
866
dev = usb_get_intfdata (interface );
867
867
mutex_lock (& iowarrior_open_disc_lock );
868
868
usb_set_intfdata (interface , NULL );
869
+ /* prevent device read, write and ioctl */
870
+ dev -> present = 0 ;
869
871
870
872
minor = dev -> minor ;
873
+ mutex_unlock (& iowarrior_open_disc_lock );
874
+ /* give back our minor - this will call close() locks need to be dropped at this point*/
871
875
872
- /* give back our minor */
873
876
usb_deregister_dev (interface , & iowarrior_class );
874
877
875
878
mutex_lock (& dev -> mutex );
876
879
877
880
/* prevent device read, write and ioctl */
878
- dev -> present = 0 ;
879
881
880
882
mutex_unlock (& dev -> mutex );
881
- mutex_unlock (& iowarrior_open_disc_lock );
882
883
883
884
if (dev -> opened ) {
884
885
/* There is a process that holds a filedescriptor to the device ,
You can’t perform that action at this time.
0 commit comments