File tree 2 files changed +3
-2
lines changed 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1099,12 +1099,10 @@ void em28xx_close_extension(struct em28xx *dev)
1099
1099
const struct em28xx_ops * ops = NULL ;
1100
1100
1101
1101
mutex_lock (& em28xx_devlist_mutex );
1102
- mutex_lock (& dev -> lock );
1103
1102
list_for_each_entry (ops , & em28xx_extension_devlist , next ) {
1104
1103
if (ops -> fini )
1105
1104
ops -> fini (dev );
1106
1105
}
1107
- mutex_unlock (& dev -> lock );
1108
1106
list_del (& dev -> devlist );
1109
1107
mutex_unlock (& em28xx_devlist_mutex );
1110
1108
}
Original file line number Diff line number Diff line change @@ -1896,6 +1896,8 @@ static int em28xx_v4l2_fini(struct em28xx *dev)
1896
1896
1897
1897
em28xx_info ("Closing video extension" );
1898
1898
1899
+ mutex_lock (& dev -> lock );
1900
+
1899
1901
v4l2_device_disconnect (& dev -> v4l2_dev );
1900
1902
1901
1903
em28xx_uninit_usb_xfer (dev , EM28XX_ANALOG_MODE );
@@ -1926,6 +1928,7 @@ static int em28xx_v4l2_fini(struct em28xx *dev)
1926
1928
1927
1929
if (dev -> users )
1928
1930
em28xx_warn ("Device is open ! Memory deallocation is deferred on last close.\n" );
1931
+ mutex_unlock (& dev -> lock );
1929
1932
1930
1933
return 0 ;
1931
1934
}
You can’t perform that action at this time.
0 commit comments