merge -c1454 trunk: Missing up(). stable-1.4
authorFlorian Pose <fp@igh-essen.com>
Mon, 29 Sep 2008 09:53:11 +0000
branchstable-1.4
changeset 1637 96da44b24111
parent 1636 b26170e168d9
child 1638 d46adcf20d22
merge -c1454 trunk: Missing up().
master/cdev.c
--- a/master/cdev.c	Wed Sep 24 10:30:30 2008 +0000
+++ b/master/cdev.c	Mon Sep 29 09:53:11 2008 +0000
@@ -518,8 +518,10 @@
     }
 
     if (copy_to_user((void __user *) data.target, domain->data,
-                domain->data_size))
-        return -EFAULT;
+                domain->data_size)) {
+        up(&master->master_sem);
+        return -EFAULT;
+    }
 
     up(&master->master_sem);
     return 0;
@@ -809,7 +811,6 @@
     request.req.data_size = data.data_size;
     ecrt_sdo_request_write(&request.req);
 
-
     if (down_interruptible(&master->master_sem))
         return -EINTR;