Currently the return value of 'dasd_eer_enable' is returned - even if the
function returned '0'. Now return 'count' for successful execution.
Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
        if (((endp + 1) < (buf + count)) || (val > 1))
                return -EINVAL;
 
-       rc = count;
-       if (val)
+       if (val) {
                rc = dasd_eer_enable(devmap->device);
-       else
+               if (rc)
+                       return rc;
+       } else
                dasd_eer_disable(devmap->device);
-       return rc;
+       return count;
 }
 
 static DEVICE_ATTR(eer_enabled, 0644, dasd_eer_show, dasd_eer_store);