aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-07 09:15:27 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-08 10:57:14 -0400
commit541b647a34d36827bf06aa64c3a5e5936cffa10f (patch)
tree1d8a0fb83cf7c9edce16fee319df615b559d2498 /drivers/media
parentmedia: mt9v111: Fix build error with no VIDEO_V4L2_SUBDEV_API (diff)
downloadlinux-dev-541b647a34d36827bf06aa64c3a5e5936cffa10f.tar.xz
linux-dev-541b647a34d36827bf06aa64c3a5e5936cffa10f.zip
media: exynos-gsc: fix return code if mutex was interrupted
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>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/exynos-gsc/gsc-m2m.c2
1 files changed, 1 insertions, 1 deletions
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);