Minor fix in VoE handler.
authorFlorian Pose <fp@igh-essen.com>
Mon, 02 Feb 2009 13:32:48 +0000
changeset 1350 cd278db5a872
parent 1349 9baba3568df4
child 1351 cf8f08631c8e
Minor fix in VoE handler.
lib/voe_handler.c
master/cdev.c
--- a/lib/voe_handler.c	Fri Jan 30 10:56:06 2009 +0000
+++ b/lib/voe_handler.c	Mon Feb 02 13:32:48 2009 +0000
@@ -142,7 +142,6 @@
 
     data.config_index = voe->config->index;
     data.voe_index = voe->index;
-    data.size = 0;
 
     if (ioctl(voe->config->master->fd, EC_IOCTL_VOE_EXEC, &data) == -1) {
         fprintf(stderr, "Failed to execute VoE handler: %s\n",
--- a/master/cdev.c	Fri Jan 30 10:56:06 2009 +0000
+++ b/master/cdev.c	Mon Feb 02 13:32:48 2009 +0000
@@ -2347,6 +2347,8 @@
     data.state = ecrt_voe_handler_execute(voe);
     if (data.state == EC_REQUEST_SUCCESS && voe->dir == EC_DIR_INPUT)
         data.size = ecrt_voe_handler_data_size(voe);
+    else
+        data.size = 0;
 
     if (copy_to_user((void __user *) arg, &data, sizeof(data)))
         return -EFAULT;