From patchwork Mon Oct 17 06:24:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 77710 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp251500qge; Sun, 16 Oct 2016 23:23:11 -0700 (PDT) X-Received: by 10.28.167.214 with SMTP id q205mr6948047wme.21.1476685391185; Sun, 16 Oct 2016 23:23:11 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id p10si39418826wjs.71.2016.10.16.23.23.09; Sun, 16 Oct 2016 23:23:11 -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 E9FA3B3822; Mon, 17 Oct 2016 08:23:00 +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 Fxsa9_ExLpCR; Mon, 17 Oct 2016 08:23:00 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B38F7B3824; Mon, 17 Oct 2016 08:22:54 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4A74DA7544 for ; Mon, 17 Oct 2016 08:22:43 +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 3PVGyv1OqrSH for ; Mon, 17 Oct 2016 08:22:43 +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-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by theia.denx.de (Postfix) with ESMTPS id 51477A7548 for ; Mon, 17 Oct 2016 08:22:38 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id u9H6M15e019722; Mon, 17 Oct 2016 15:22:03 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com u9H6M15e019722 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1476685323; bh=t/tx7SZ+vaOa0WEip/MrSY4gplUsl2tdYn4uGOeEKls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nAj4pAAXfhygS6FjmL8Q9ZpTmrTwbPC+AaW1DLSt0UdaAhCmMhc9Va3OC/dEn/yz5 avyk6zS+N4nhMbsTm7agIL3j6Bfg22h3aI6NDFajKtluqHYhEfuUi/JkCp4rxus7QG Y/L7gl7A+6/B0bhGm81906fQJqPI3DrfdHKnXwF7mJt3l+ttTX9BYA9ckTfdJDb3Cq u2bfmXO6ya21QX3GITh2cnu/F0TNOy3z6CTqd+Fx4fj0BOY4Te7SXdCtEugaR9ObLX eHLirF9hE++KNpHeIj9/MVOFtDlhQN0ziQP/clrpnrQKXShGgoTnxYNRHLV7kvrWoT s49g8D/fPBxLQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 17 Oct 2016 15:24:30 +0900 Message-Id: <1476685470-4372-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1476685470-4372-1-git-send-email-yamada.masahiro@socionext.com> References: <1476685470-4372-1-git-send-email-yamada.masahiro@socionext.com> Subject: [U-Boot] [PATCH 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. Signed-off-by: Masahiro Yamada --- 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 Acked-by: Simon Glass 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;