Module Name: src
Committed By: skrll
Date: Fri Jan 23 10:19:22 UTC 2015
Modified Files:
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm: vchiq_arm.c
Log Message:
More count vs ret confusion. Need to send notification if count != 0.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 \
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c
diff -u src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c:1.14 src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c:1.15
--- src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c:1.14 Sat Dec 20 19:40:49 2014
+++ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c Fri Jan 23 10:19:22 2015
@@ -718,6 +718,7 @@ vchiq_ioctl(struct file *fp, u_long cmd,
case VCHIQ_IOC_AWAIT_COMPLETION: {
VCHIQ_AWAIT_COMPLETION_T *pargs = arg;
+ int count = 0;
DEBUG_TRACE(AWAIT_COMPLETION_LINE);
if (!instance->connected) {
@@ -752,9 +753,8 @@ vchiq_ioctl(struct file *fp, u_long cmd,
if (ret == 0) {
int msgbufcount = pargs->msgbufcount;
- int count;
- for (count = 0; count < pargs->count; count++) {
+ for (; count < pargs->count; count++) {
VCHIQ_COMPLETION_DATA_T *completion;
VCHIQ_SERVICE_T *service1;
USER_SERVICE_T *user_service;
@@ -847,7 +847,7 @@ vchiq_ioctl(struct file *fp, u_long cmd,
pargs->count = count;
}
- if (ret != 0)
+ if (count != 0)
up(&instance->remove_event);
lmutex_unlock(&instance->completion_mutex);
DEBUG_TRACE(AWAIT_COMPLETION_LINE);