# HG changeset patch
# User Florian Pose <fp@igh-essen.com>
# Date 1222681991 0
# Node ID 96da44b24111f1057c74ac4052887291fb5329bb
# Parent  b26170e168d9359e08617e53be06cf0b600a3aaa
merge -c1454 trunk: Missing up().

diff -r b26170e168d9 -r 96da44b24111 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;