From patchwork Mon Oct 17 11:22:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 77733 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp343749qge; Mon, 17 Oct 2016 04:21:15 -0700 (PDT) X-Received: by 10.194.82.163 with SMTP id j3mr12851865wjy.56.1476703275687; Mon, 17 Oct 2016 04:21:15 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id b18si40942120wjb.236.2016.10.17.04.21.15; Mon, 17 Oct 2016 04:21:15 -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 343EFA75CA; Mon, 17 Oct 2016 13:21:08 +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 Q6b14HUVEglJ; Mon, 17 Oct 2016 13:21:08 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CD5B9A75FB; Mon, 17 Oct 2016 13:20:58 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0E055A75BC 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 zzUBVj34RGDG 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 444F4A759C 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 u9HBK81K030980; Mon, 17 Oct 2016 20:20:08 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com u9HBK81K030980 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1476703209; bh=xyopEuLE0JQpVSg+Zch/fUUk2n7DrTVtvaLcAOrVMrA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EyS762k0Su11XxCFewXHgjnv3VGZidee9JVgUZefJ2XawfwyrXUtYB/OKCwPbP6RU 2XanK7/G3mNRUh0crrB5HcxQyy1aSWVlGIuMDMP/NXsQfTZIQoo71uGJTehpyC0y95 w3OyE83MzduU5COnZVAaEvhImj57i4u8Z1+Je/DVFEks3Zlsf6dQG53b09gKVjYJNq VAJXr8aEV4AS6qkmIaoT6goOjmG+9tU6r+v1sFWzUOT8zC3BhQlnyFq3NExkiQ83Oj bfMBJxFWzRI2axb7FYzBwDDMZiu1ek8h7cBUoXsdRjxMDTMK+If7hZTJfXCanpXiic Sjc9CpWqD62LQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 17 Oct 2016 20:22:33 +0900 Message-Id: <1476703354-16474-2-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 1/2] libfdt: fix fdt_stringlist_count() 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: e28eff5b787adb3f461d1653598818b2f1f25a73 ] 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 7e894b7..fc08981 100644 --- a/lib/libfdt/fdt_ro.c +++ b/lib/libfdt/fdt_ro.c @@ -550,7 +550,7 @@ int fdt_stringlist_count(const void *fdt, int nodeoffset, const char *property) list = fdt_getprop(fdt, nodeoffset, property, &length); if (!list) - return -length; + return length; end = list + length;