The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v1 1/2] lib-string-introduce-match_string-helper fix
@ 2016-02-08 14:06 Andy Shevchenko
  2016-02-08 14:06 ` [PATCH v1 2/2] device-property-convert-to-use-match_string-helper fix Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2016-02-08 14:06 UTC (permalink / raw)
  To: Andrew Morton, Rasmus Villemoes, linux-kernel; +Cc: Andy Shevchenko

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-08 14:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-08 14:06 [PATCH v1 1/2] lib-string-introduce-match_string-helper fix Andy Shevchenko
2016-02-08 14:06 ` [PATCH v1 2/2] device-property-convert-to-use-match_string-helper fix Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox