linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] media: exynos-gsc: fix return code if mutex was interrupted
@ 2018-08-08 14:52 Mauro Carvalho Chehab
  2018-08-08 14:52 ` [PATCH 2/6] media: saa7164: fix return codes for the polling routine Mauro Carvalho Chehab
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Mauro Carvalho Chehab @ 2018-08-08 14:52 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab, Kukjin Kim, Krzysztof Kozlowski,
	Sylwester Nawrocki, Hans Verkuil, Al Viro, Marek Szyprowski,
	Julia Lawall, linux-arm-kernel, linux-samsung-soc

All poll routines expect a poll flag, and not error codes. So,
instead of returning -ERESTARTSYS if the mutex got interrupted,
return EPOLERR, just like the V4L2 VB2 code.

Solves this sparce warning:
	drivers/media/platform/exynos-gsc/gsc-m2m.c:716:24: warning: incorrect type in return expression (different base types)
	drivers/media/platform/exynos-gsc/gsc-m2m.c:716:24:    expected restricted __poll_t
	drivers/media/platform/exynos-gsc/gsc-m2m.c:716:24:    got int

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 drivers/media/platform/exynos-gsc/gsc-m2m.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/exynos-gsc/gsc-m2m.c b/drivers/media/platform/exynos-gsc/gsc-m2m.c
index e9ff27949a91..c9d2f6c5311a 100644
--- a/drivers/media/platform/exynos-gsc/gsc-m2m.c
+++ b/drivers/media/platform/exynos-gsc/gsc-m2m.c
@@ -713,7 +713,7 @@ static __poll_t gsc_m2m_poll(struct file *file,
 	__poll_t ret;
 
 	if (mutex_lock_interruptible(&gsc->lock))
-		return -ERESTARTSYS;
+		return EPOLLERR;
 
 	ret = v4l2_m2m_poll(file, ctx->m2m_ctx, wait);
 	mutex_unlock(&gsc->lock);
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-09-20 23:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-08 14:52 [PATCH 1/6] media: exynos-gsc: fix return code if mutex was interrupted Mauro Carvalho Chehab
2018-08-08 14:52 ` [PATCH 2/6] media: saa7164: fix return codes for the polling routine Mauro Carvalho Chehab
2018-08-08 14:52 ` [PATCH 3/6] media: s3c-camif: fix return code " Mauro Carvalho Chehab
2018-08-08 14:52 ` [PATCH 4/6] media: radio-wl1273: " Mauro Carvalho Chehab
2018-08-08 14:52 ` [PATCH 5/6] media: isp: fix a warning about a wrong struct initializer Mauro Carvalho Chehab
2018-08-08 15:45   ` Laurent Pinchart
2018-09-07 11:46     ` Laurent Pinchart
2018-09-11 15:30       ` Laurent Pinchart
2018-09-20 14:44       ` Mauro Carvalho Chehab
2018-09-20 17:20         ` Laurent Pinchart
2018-08-08 14:52 ` [PATCH 6/6] siano: get rid of an unused return code for debugfs register Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).