Skip to content

Commit fc22917

Browse files
iridesgregkh
authored andcommitted
device-dax: Fix default return code of range_parse()
[ Upstream commit 7323fb2 ] The return value of range_parse() indicates the size when it is positive. The error code should be negative. Signed-off-by: Shiyang Ruan <ruansy.fnst@cn.fujitsu.com> Reviewed-by: Joao Martins <joao.m.martins@oracle.com> Link: https://lore.kernel.org/r/20210126021331.1059933-1-ruansy.fnst@cn.fujitsu.com Reported-by: Zhang Qilong <zhangqilong3@huawei.com> Fixes: 8490e2e ("device-dax: add a range mapping allocation attribute") Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 37aba9c commit fc22917

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/dax/bus.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,7 @@ static ssize_t range_parse(const char *opt, size_t len, struct range *range)
10461046
{
10471047
unsigned long long addr = 0;
10481048
char *start, *end, *str;
1049-
ssize_t rc = EINVAL;
1049+
ssize_t rc = -EINVAL;
10501050

10511051
str = kstrdup(opt, GFP_KERNEL);
10521052
if (!str)

0 commit comments

Comments
 (0)