From patchwork Mon Oct 17 11:22:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 77732 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp343692qge; Mon, 17 Oct 2016 04:21:05 -0700 (PDT) X-Received: by 10.194.84.144 with SMTP id z16mr10904772wjy.210.1476703265466; Mon, 17 Oct 2016 04:21:05 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id kp7si8013176wjb.145.2016.10.17.04.21.04; Mon, 17 Oct 2016 04:21:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5972EA75E1; Mon, 17 Oct 2016 13:21:02 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UtVUcQndmpgV; Mon, 17 Oct 2016 13:21:02 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D473CA75E9; Mon, 17 Oct 2016 13:20:56 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 01686A754A for ; Mon, 17 Oct 2016 13:20:51 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KzbvIOo9Ib6Y for ; Mon, 17 Oct 2016 13:20:50 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from conuserg-12.nifty.com (conuserg-12.nifty.com [210.131.2.79]) by theia.denx.de (Postfix) with ESMTPS id 4174CA759A for ; Mon, 17 Oct 2016 13:20:46 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id u9HBK81L030980; Mon, 17 Oct 2016 20:20:09 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com u9HBK81L030980 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1476703209; bh=RZbZM3n9eMGJWQBcYst9lb2CHCGZeB/Xwq+WMyuBcc4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BR8OsE8ARVJazQYRFKOff2dYOzr+U99UgG0DXxz+B766MBKzsacFmg9liVLIgdl0h avyrQA+tSkMiFUrSQU2h0IaKIhaT9kDltu0UoctkHoDm6hJjqR+WFtxJ48OIqUvniP pEQ1aMjdGT+RIwU790r41ZHE6Fs3QgCSSlAd4DJGNRskHh5g/XVYz9ZtHiDHmVMGuu 8aotM+nRt+jjWlYhggWuGx5y25p8q1+Knvr99Zpizu76eVaogd2ZjzqzQ3+EVJ2VUB xMRhLQSgRUmrzEWqKCh8pkTPybUYRCzF5g6QgqUqIvnZjsrUrno5vWkEB74fPMxMit 3O0zOW0g/40aA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 17 Oct 2016 20:22:34 +0900 Message-Id: <1476703354-16474-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1476703354-16474-1-git-send-email-yamada.masahiro@socionext.com> References: <1476703354-16474-1-git-send-email-yamada.masahiro@socionext.com> Cc: David Gibson Subject: [U-Boot] [PATCH v2 2/2] libfdt: fix fdt_stringlist_search() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" If fdt_getprop() fails, negative error code should be returned. [ DTC commit: daa75e8fa5942caa8e97931aed3a1ee0b7edd74b ] Signed-off-by: Masahiro Yamada Signed-off-by: David Gibson --- lib/libfdt/fdt_ro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/lib/libfdt/fdt_ro.c b/lib/libfdt/fdt_ro.c index fc08981..1be9538 100644 --- a/lib/libfdt/fdt_ro.c +++ b/lib/libfdt/fdt_ro.c @@ -576,7 +576,7 @@ int fdt_stringlist_search(const void *fdt, int nodeoffset, const char *property, list = fdt_getprop(fdt, nodeoffset, property, &length); if (!list) - return -length; + return length; len = strlen(string) + 1; end = list + length;