Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3713846pxb; Tue, 26 Jan 2021 02:52:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJzj9D5Ruj5yZuF1lNTJfDUIyVjQY/hG2DN4R64rW/j7gaj99v3W+zG0eEdtFS9Dz8JNA2kJ X-Received: by 2002:a17:907:3fa6:: with SMTP id hr38mr3142456ejc.24.1611658345225; Tue, 26 Jan 2021 02:52:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611658345; cv=none; d=google.com; s=arc-20160816; b=WDqJjBPQJkiZNWJGK+5V/OFP5HOHLzyLmhvKhaIo5R+k61PhvcQDESAmBeOfucIqXB hy4G/ioZg68dC4gytU1GdnulF+vQLJ957IhMuFlyRn/n3Mmb9CaaI55hq1ZxXBe9Wywm BG7RpwnwvH0x2sR6DXbmDm8fgOTepuiUAq29Sn5yjewIR92v88ih7RWzZ4fW6kRaXvY7 SRj7kZNrPtWM4GVT5KPDh/ihF/JnuMUkRZoK8hBuzYsYHMIDvtmyn2JH6zKAetRvq406 yWSDddS55t7th64XghlMYvMxaS2y1dTqmsukCZ/q/SgefHyK+b43Jhb//Ml5KVTicHmF AhJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=F3TybXhjEMOk6uyEGeoS1pWnRE732AujtNVM3RaBY2g=; b=Rad7+YdbKVdQd3npOnVUsaF8OhyALIV5KVq3OfW+RAenJMj2kOcmHS0qja+mSpZSfR hUa8bMPncIVE9Ry/dCTZPBQMslpcvmZb7aYPASx2pi/fx6Kwl2uDhU1G2VcKK6HhyX7M 8Pgamo5KAs2dbBFGV5HRm5yNO9BcScSlU288OVkinSfgSi9zLnefQeoMUDm7AujIiSd5 CxIgcZg+XLOWXVyq1Vzh8xXyAjnbMcjfqCJxeF8mWjgTO32GFgoa7CDyASWHAS6EZehw dF8jCJloqjKioyxBzH3wS8xTEzsnzXCO0tVdP4j7Am9d2s4AId11g8NwjHp1hcAf1jIM JK2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x19si8095601edd.134.2021.01.26.02.52.01; Tue, 26 Jan 2021 02:52:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404245AbhAZKsY (ORCPT + 99 others); Tue, 26 Jan 2021 05:48:24 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:63671 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730850AbhAZCOZ (ORCPT ); Mon, 25 Jan 2021 21:14:25 -0500 X-IronPort-AV: E=Sophos;i="5.79,375,1602518400"; d="scan'208";a="103827318" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 26 Jan 2021 10:13:37 +0800 Received: from G08CNEXMBPEKD04.g08.fujitsu.local (unknown [10.167.33.201]) by cn.fujitsu.com (Postfix) with ESMTP id CFBDA48990D2; Tue, 26 Jan 2021 10:13:35 +0800 (CST) Received: from G08CNEXCHPEKD04.g08.fujitsu.local (10.167.33.200) by G08CNEXMBPEKD04.g08.fujitsu.local (10.167.33.201) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 26 Jan 2021 10:13:34 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD04.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 26 Jan 2021 10:13:34 +0800 From: Shiyang Ruan To: , , , CC: Subject: [PATCH] dax: fix default return code of range_parse() Date: Tue, 26 Jan 2021 10:13:31 +0800 Message-ID: <20210126021331.1059933-1-ruansy.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-yoursite-MailScanner-ID: CFBDA48990D2.AACFD X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@cn.fujitsu.com X-Spam-Status: No Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The return value of range_parse() indicates the size when it is positive. The error code should be negative. Signed-off-by: Shiyang Ruan --- drivers/dax/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index 737b207c9e30..3003558c1a8b 100644 --- a/drivers/dax/bus.c +++ b/drivers/dax/bus.c @@ -1038,7 +1038,7 @@ static ssize_t range_parse(const char *opt, size_t len, struct range *range) { unsigned long long addr = 0; char *start, *end, *str; - ssize_t rc = EINVAL; + ssize_t rc = -EINVAL; str = kstrdup(opt, GFP_KERNEL); if (!str) -- 2.30.0