Commit cf2865a0 authored by Todd Poynor's avatar Todd Poynor Committed by Greg Kroah-Hartman

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: default avatarZhongze Hu <frankhu@chromium.org>
Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 722c902a
...@@ -194,7 +194,7 @@ int gasket_sysfs_create_mapping( ...@@ -194,7 +194,7 @@ int gasket_sysfs_create_mapping(
"0x%p.", device); "0x%p.", device);
put_mapping(mapping); put_mapping(mapping);
mutex_unlock(&function_mutex); mutex_unlock(&function_mutex);
return -EINVAL; return -EBUSY;
} }
/* Find the first empty entry in the array. */ /* Find the first empty entry in the array. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment