diff options
author | Shiyang Ruan <ruansy.fnst@cn.fujitsu.com> | 2021-01-26 05:13:31 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2021-02-17 01:37:43 +0300 |
commit | 7323fb22f05ff1d20498d267828870a5fbbaebd6 (patch) | |
tree | 1c530ee3bed4823628f15661abeb44495dc1dc1b /drivers/dax | |
parent | 1048ba83fb1c00cd24172e23e8263972f6b5d9ac (diff) | |
download | linux-7323fb22f05ff1d20498d267828870a5fbbaebd6.tar.xz |
device-dax: Fix default return code of range_parse()
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: 8490e2e25b5a ("device-dax: add a range mapping allocation attribute")
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dax')
-rw-r--r-- | drivers/dax/bus.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |