Added missing up().
authorFlorian Pose <fp@igh-essen.com>
Mon, 29 Sep 2008 09:51:48 +0000
changeset 1223 6d539205114e
parent 1222 7348d6abb6cb
child 1224 784bb76105cd
Added missing up().
master/cdev.c
--- a/master/cdev.c	Wed Sep 24 10:28:59 2008 +0000
+++ b/master/cdev.c	Mon Sep 29 09:51:48 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;