Skip to contentSkip to conversation

media: vimc: streamer: if kthread_stop fails, ignore the error

PATCH Superseded Dafna Hirschfeld 1 participant 1 message Jan 15, 2020 Media (V4L/DVB)

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 media: vimc: streamer: if kthread_stop fails, ignore the error

Ignore errors returned from kthread_stop since the vimc subdevices should still be notified that streaming stopped so they can release the memory for the streaming, and also kthread should be set to NULL. kthread_stop can return -EINTR in case the thread did not yet ran. This can happen if userspace calls streamon and streamoff right after.

---
Changes from v1: undo deletion of an empty line

 drivers/media/platform/vimc/vimc-streamer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/vimc/vimc-streamer.c +1 -1
index cd6b55433c9e..417970dbad14 100644
@@ -216,7 +216,7 @@ int vimc_streamer_s_stream(struct vimc_stream *stream,
 
 		ret = kthread_stop(stream->kthread);
 		if (ret)
-			return ret;
+			dev_warn(ved->dev, "kthread_stop returned '%d'\n", ret);
 
 		stream->kthread = NULL;
 
Signature · 1 line
2.17.1