Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
[linux-2.6.git] / drivers / s390 / cio / ccwgroup.c
index 86b136cb09e0b0f7fb0b315fcebbf3e204b183cc..22ce765d537e9f0bccbca4c769131c07b3c03574 100644 (file)
@@ -104,8 +104,9 @@ ccwgroup_ungroup_store(struct device *dev, struct device_attribute *attr, const
        rc = device_schedule_callback(dev, ccwgroup_ungroup_callback);
 out:
        if (rc) {
-               /* Release onoff "lock" when ungrouping failed. */
-               atomic_set(&gdev->onoff, 0);
+               if (rc != -EAGAIN)
+                       /* Release onoff "lock" when ungrouping failed. */
+                       atomic_set(&gdev->onoff, 0);
                return rc;
        }
        return count;