From patchwork Mon Apr 15 08:23:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi Zhang X-Patchwork-Id: 10900281 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 04C4F14DB for ; Mon, 15 Apr 2019 08:24:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBC2C28823 for ; Mon, 15 Apr 2019 08:24:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE57228826; Mon, 15 Apr 2019 08:24:07 +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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [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 66F1A28823 for ; Mon, 15 Apr 2019 08:24:07 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 032822120B137; Mon, 15 Apr 2019 01:24:07 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=yi.zhang@redhat.com; receiver=linux-nvdimm@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AFEF42194EB78 for ; Mon, 15 Apr 2019 01:24:05 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E30E430820DD; Mon, 15 Apr 2019 08:24:04 +0000 (UTC) Received: from dhcp-12-135.nay.redhat.com (dhcp-12-135.nay.redhat.com [10.66.12.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3D3325D707; Mon, 15 Apr 2019 08:24:02 +0000 (UTC) From: Yi Zhang To: dave.jiang@intel.com, dan.j.williams@intel.com Subject: [PATCH ndctl] ndctl, region: return the rc value in region_action Date: Mon, 15 Apr 2019 16:23:57 +0800 Message-Id: <20190415082357.31127-1-yi.zhang@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 15 Apr 2019 08:24:04 +0000 (UTC) X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-nvdimm@lists.01.org MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP if region_action failed, return the rc valude instead of 0 Signed-off-by: Yi Zhang Reviewed-by: Dan Williams --- ndctl/region.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndctl/region.c b/ndctl/region.c index 993b3f8..7945007 100644 --- a/ndctl/region.c +++ b/ndctl/region.c @@ -89,7 +89,7 @@ static int region_action(struct ndctl_region *region, enum device_action mode) break; } - return 0; + return rc; } static int do_xable_region(const char *region_arg, enum device_action mode,