File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
drivers/media/test-drivers/vidtv Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -191,10 +191,11 @@ static int vidtv_start_streaming(struct vidtv_dvb *dvb)
191
191
192
192
mux_args .mux_buf_sz = mux_buf_sz ;
193
193
194
- dvb -> streaming = true;
195
194
dvb -> mux = vidtv_mux_init (dvb -> fe [0 ], dev , & mux_args );
196
195
if (!dvb -> mux )
197
196
return - ENOMEM ;
197
+
198
+ dvb -> streaming = true;
198
199
vidtv_mux_start_thread (dvb -> mux );
199
200
200
201
dev_dbg_ratelimited (dev , "Started streaming\n" );
@@ -205,6 +206,11 @@ static int vidtv_stop_streaming(struct vidtv_dvb *dvb)
205
206
{
206
207
struct device * dev = & dvb -> pdev -> dev ;
207
208
209
+ if (!dvb -> streaming ) {
210
+ dev_warn_ratelimited (dev , "No streaming. Skipping.\n" );
211
+ return 0 ;
212
+ }
213
+
208
214
dvb -> streaming = false;
209
215
vidtv_mux_stop_thread (dvb -> mux );
210
216
vidtv_mux_destroy (dvb -> mux );
You can’t perform that action at this time.
0 commit comments