diff options
author | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-08-07 15:23:33 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-08-08 16:57:14 +0200 |
commit | c46aa8491dd40d4ede5c9196c20d78e1e8c27786 (patch) | |
tree | 1f0b9e21dfc45ad2f804dce7eb63a1fc2413311e /drivers/media | |
parent | media: saa7164: fix return codes for the polling routine (diff) | |
download | linux-c46aa8491dd40d4ede5c9196c20d78e1e8c27786.tar.xz linux-c46aa8491dd40d4ede5c9196c20d78e1e8c27786.zip |
media: s3c-camif: fix return code for the polling routine
All poll handlers should return a poll flag, and not error codes. So,
instead of returning an error, do the right thing here,
e. g. to return EPOLERR on errors, just like the V4L2 VB2 code.
Solves the following sparse warning:
drivers/media/platform/s3c-camif/camif-capture.c:604:21: warning: incorrect type in assignment (different base types)
drivers/media/platform/s3c-camif/camif-capture.c:604:21: expected restricted __poll_t [usertype] ret
drivers/media/platform/s3c-camif/camif-capture.c:604:21: got int
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/s3c-camif/camif-capture.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/s3c-camif/camif-capture.c b/drivers/media/platform/s3c-camif/camif-capture.c index b1d9f3857d3d..c02dce8b4c6c 100644 --- a/drivers/media/platform/s3c-camif/camif-capture.c +++ b/drivers/media/platform/s3c-camif/camif-capture.c @@ -601,7 +601,7 @@ static __poll_t s3c_camif_poll(struct file *file, mutex_lock(&camif->lock); if (vp->owner && vp->owner != file->private_data) - ret = -EBUSY; + ret = EPOLLERR; else ret = vb2_poll(&vp->vb_queue, file, wait); |