Browse Source

staging: gasket: Return EBUSY on mapping create when already in use

gasket_sysfs_create_mapping() return EBUSY if sysfs mapping already in
use, as a more appropriate error code than the current return of EINVAL,
which would indicate invalid parameters.

Signed-off-by: Zhongze Hu <frankhu@chromium.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Todd Poynor 7 years ago
parent
commit
cf2865a0c7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/staging/gasket/gasket_sysfs.c

+ 1 - 1
drivers/staging/gasket/gasket_sysfs.c

@@ -194,7 +194,7 @@ int gasket_sysfs_create_mapping(
 			"0x%p.", device);
 		put_mapping(mapping);
 		mutex_unlock(&function_mutex);
-		return -EINVAL;
+		return -EBUSY;
 	}
 
 	/* Find the first empty entry in the array. */