diff options
author | Stefani Seibold <stefani@seibold.net> | 2009-12-21 17:37:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-22 17:17:56 -0500 |
commit | 9842c38e917636fa7dc6b88aff17a8f1fd7f0cc0 (patch) | |
tree | 71d0b52ddc243743046bba9f774beca9febc393a /drivers/media/video/meye.c | |
parent | 7acd72eb85f1c7a15e8b5eb554994949241737f1 (diff) |
kfifo: fix warn_unused_result
Fix the "ignoring return value of '...', declared with attribute
warn_unused_result" compiler warning in several users of the new kfifo
API.
It removes the __must_check attribute from kfifo_in() and
kfifo_in_locked() which must not necessary performed.
Fix the allocation bug in the nozomi driver file, by moving out the
kfifo_alloc from the interrupt handler into the probe function.
Fix the kfifo_out() and kfifo_out_locked() users to handle a unexpected
end of fifo.
Signed-off-by: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/media/video/meye.c')
-rw-r--r-- | drivers/media/video/meye.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c index 884a569d60a2..b421858ccf90 100644 --- a/drivers/media/video/meye.c +++ b/drivers/media/video/meye.c | |||
@@ -968,8 +968,9 @@ static int meyeioc_sync(struct file *file, void *fh, int *i) | |||
968 | /* fall through */ | 968 | /* fall through */ |
969 | case MEYE_BUF_DONE: | 969 | case MEYE_BUF_DONE: |
970 | meye.grab_buffer[*i].state = MEYE_BUF_UNUSED; | 970 | meye.grab_buffer[*i].state = MEYE_BUF_UNUSED; |
971 | kfifo_out_locked(&meye.doneq, (unsigned char *)&unused, | 971 | if (kfifo_out_locked(&meye.doneq, (unsigned char *)&unused, |
972 | sizeof(int), &meye.doneq_lock); | 972 | sizeof(int), &meye.doneq_lock) != sizeof(int)) |
973 | break; | ||
973 | } | 974 | } |
974 | *i = meye.grab_buffer[*i].size; | 975 | *i = meye.grab_buffer[*i].size; |
975 | mutex_unlock(&meye.lock); | 976 | mutex_unlock(&meye.lock); |