lkml.org 
[lkml]   [2016]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v1 1/2] lib-string-introduce-match_string-helper fix
Date
Fix return code to be -EINVAL instead of -ENODATA.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
lib/string.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/string.c b/lib/string.c
index f2a8fa6..ed83562 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -637,7 +637,7 @@ EXPORT_SYMBOL(sysfs_streq);
* @string: string to match with
*
* Return:
- * index of a @string in the @array if matches, or %-ENODATA otherwise.
+ * index of a @string in the @array if matches, or %-EINVAL otherwise.
*/
int match_string(const char * const *array, size_t n, const char *string)
{
@@ -652,7 +652,7 @@ int match_string(const char * const *array, size_t n, const char *string)
return index;
}

- return -ENODATA;
+ return -EINVAL;
}
EXPORT_SYMBOL(match_string);

--
2.7.0
\
 
 \ /
  Last update: 2016-02-08 15:21    [W:0.058 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site