From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753037AbcBHOHD (ORCPT ); Mon, 8 Feb 2016 09:07:03 -0500 Received: from mga01.intel.com ([192.55.52.88]:64212 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751804AbcBHOHA (ORCPT ); Mon, 8 Feb 2016 09:07:00 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,416,1449561600"; d="scan'208";a="898630352" From: Andy Shevchenko To: Andrew Morton , Rasmus Villemoes , linux-kernel@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1 1/2] lib-string-introduce-match_string-helper fix Date: Mon, 8 Feb 2016 16:06:55 +0200 Message-Id: <1454940416-65974-1-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.7.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix return code to be -EINVAL instead of -ENODATA. Signed-off-by: Andy Shevchenko --- 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