device-dax: Fix default return code of range_parse()
authorShiyang Ruan <ruansy.fnst@cn.fujitsu.com>
Tue, 26 Jan 2021 02:13:31 +0000 (10:13 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:38:15 +0000 (11:38 +0100)
commitfc22917f48ee61eebfc462de92a685b9f508bddc
tree8e5c69ff3faa702ff3dad88c4bf81c33c4a5e141
parent37aba9cfece7819127e5e0d739ff54ec44695b9b
device-dax: Fix default return code of range_parse()

[ Upstream commit 7323fb22f05ff1d20498d267828870a5fbbaebd6 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dax/bus.c