From patchwork Mon Oct 17 06:24:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 77709 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp251463qge; Sun, 16 Oct 2016 23:23:00 -0700 (PDT) X-Received: by 10.194.106.197 with SMTP id gw5mr11829518wjb.88.1476685380866; Sun, 16 Oct 2016 23:23:00 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id je6si22363182wjb.41.2016.10.16.23.23.00; Sun, 16 Oct 2016 23:23:00 -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 BDB6EB382E; Mon, 17 Oct 2016 08:22:54 +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 tOi03UTI-zqH; Mon, 17 Oct 2016 08:22:54 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D7E68B3831; Mon, 17 Oct 2016 08:22:52 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0E5DDA7559 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 kzr5DAsCuqF3 for ; Mon, 17 Oct 2016 08:22:42 +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 4EDB0A7544 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 u9H6M15d019722; Mon, 17 Oct 2016 15:22:02 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com u9H6M15d019722 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1476685322; bh=/KlM2Axx3CRWmagy7xfppcLlLs2fM1winYW+Wxl+V7U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mW8tPwPb7Yev9y22UxhW5qm1lr0JF2HrONGT1zVLlrGzHgKefFqaD7jLD0hmUVFV4 eqxYgSZyiqeaIGGBVHTNtUcI7PypXlZZesSXjOc3ZpKv0OtZOwEVYTdy6shf5WZNJ8 Eg1oB1suW5RqLPpm4A0O2Ne16iCHqErlHqIGqZ4iEGQVvWzRe999labe5yuDb55gz0 rpuzpUUQTKaboDgDEWyP+H3nfFatesFZcZ5WqWRUPVlB6i2suuZ5zuOer2TRjwBHOw 0jM/W8pUqivhBpQC3FB+cJ7OdFC56Of6DlPIgQ9j+CEnuwxmxZy5Ov4lSmk72RhHEp sdHLqLCqxL+gg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 17 Oct 2016 15:24:29 +0900 Message-Id: <1476685470-4372-2-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 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. 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 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;