mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 18:30:06 +00:00
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: 8490e2e25b
("device-dax: add a range mapping allocation attribute")
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
1048ba83fb
commit
7323fb22f0
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue