]> Git Repo - linux.git/commitdiff
Input: iforce - use ENOSPC instead of ENOMEM
authorAnssi Hannula <[email protected]>
Mon, 5 Jun 2006 04:18:21 +0000 (00:18 -0400)
committerDmitry Torokhov <[email protected]>
Mon, 5 Jun 2006 04:18:21 +0000 (00:18 -0400)
Use -ENOSPC instead of -ENOMEM when the iforce device doesn't have
enough free memory for the new effect.  All other drivers are using
-ENOSPC, so this makes the behaviour coherent.

Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
drivers/input/joystick/iforce/iforce-ff.c

index 2b8e8456c9fae62349da5813eae01e2f789fbab4..50c90765aee15274eefc8b8fd05367af14e00462 100644 (file)
@@ -47,7 +47,7 @@ static int make_magnitude_modifier(struct iforce* iforce,
                        iforce->device_memory.start, iforce->device_memory.end, 2L,
                        NULL, NULL)) {
                        mutex_unlock(&iforce->mem_mutex);
-                       return -ENOMEM;
+                       return -ENOSPC;
                }
                mutex_unlock(&iforce->mem_mutex);
        }
@@ -80,7 +80,7 @@ static int make_period_modifier(struct iforce* iforce,
                        iforce->device_memory.start, iforce->device_memory.end, 2L,
                        NULL, NULL)) {
                        mutex_unlock(&iforce->mem_mutex);
-                       return -ENOMEM;
+                       return -ENOSPC;
                }
                mutex_unlock(&iforce->mem_mutex);
        }
@@ -120,7 +120,7 @@ static int make_envelope_modifier(struct iforce* iforce,
                        iforce->device_memory.start, iforce->device_memory.end, 2L,
                        NULL, NULL)) {
                        mutex_unlock(&iforce->mem_mutex);
-                       return -ENOMEM;
+                       return -ENOSPC;
                }
                mutex_unlock(&iforce->mem_mutex);
        }
@@ -157,7 +157,7 @@ static int make_condition_modifier(struct iforce* iforce,
                        iforce->device_memory.start, iforce->device_memory.end, 2L,
                        NULL, NULL)) {
                        mutex_unlock(&iforce->mem_mutex);
-                       return -ENOMEM;
+                       return -ENOSPC;
                }
                mutex_unlock(&iforce->mem_mutex);
        }
This page took 0.057632 seconds and 4 git commands to generate.