The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	linux-kernel@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 2/2] device-property-convert-to-use-match_string-helper fix
Date: Mon,  8 Feb 2016 16:06:56 +0200	[thread overview]
Message-ID: <1454940416-65974-2-git-send-email-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <1454940416-65974-1-git-send-email-andriy.shevchenko@linux.intel.com>

Since match_string() returns -EINVAL let's convert it to -ENODATA as designed
by device property API.

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

diff --git a/drivers/base/property.c b/drivers/base/property.c
index f902b55..167f0a9 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -665,6 +665,8 @@ int fwnode_property_match_string(struct fwnode_handle *fwnode,
 		goto out;
 
 	ret = match_string(values, nval, string);
+	if (ret < 0)
+		ret = -ENODATA;
 out:
 	kfree(values);
 	return ret;
-- 
2.7.0

      reply	other threads:[~2016-02-08 14:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08 14:06 [PATCH v1 1/2] lib-string-introduce-match_string-helper fix Andy Shevchenko
2016-02-08 14:06 ` Andy Shevchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1454940416-65974-2-git-send-email-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox