Skip to content

Commit

Permalink
media: exynos-gsc: fix return code if mutex was interrupted
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mchehab committed Aug 8, 2018
1 parent 484f9b3 commit 541b647
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/platform/exynos-gsc/gsc-m2m.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 541b647

Please sign in to comment.