From patchwork Mon Sep 19 21:38:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 9340623 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E9FEB601C2 for ; Mon, 19 Sep 2016 21:41:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E46A42995E for ; Mon, 19 Sep 2016 21:41:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D757529963; Mon, 19 Sep 2016 21:41:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: * X-Spam-Status: No, score=1.6 required=2.0 tests=BAYES_50, RCVD_IN_DNSWL_NONE, RDNS_NONE autolearn=no version=3.3.1 Received: from ml01.01.org (unknown [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A07222995E for ; Mon, 19 Sep 2016 21:41:26 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 034671A1E3D; Mon, 19 Sep 2016 14:41:07 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AC41E1A1E3D for ; Mon, 19 Sep 2016 14:41:05 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 19 Sep 2016 14:41:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,363,1470726000"; d="scan'208";a="763472653" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.14]) by FMSMGA003.fm.intel.com with ESMTP; 19 Sep 2016 14:41:05 -0700 Subject: [ndctl PATCH 4/6] test, libndctl: fix uninitialized variable usage in check_btt_size() From: Dan Williams To: linux-nvdimm@lists.01.org Date: Mon, 19 Sep 2016 14:38:02 -0700 Message-ID: <147432107740.39548.1060602141777439986.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <147432105652.39548.8883834720654751375.stgit@dwillia2-desk3.amr.corp.intel.com> References: <147432105652.39548.8883834720654751375.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.17.1-9-g687f MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP If the namespace size is not one we expect, fail the test. Signed-off-by: Dan Williams --- test/libndctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/libndctl.c b/test/libndctl.c index e36fe8a4fe6f..a0bf74a9c333 100644 --- a/test/libndctl.c +++ b/test/libndctl.c @@ -984,7 +984,7 @@ static int check_btt_size(struct ndctl_btt *btt) fprintf(stderr, "%s: %s unexpected namespace size: %llx\n", __func__, ndctl_namespace_get_devname(ndns), ns_size); - break; + return -ENXIO; } expect = expect_table[size_select][sect_select];