Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devm_memremap: Fix error value when memremap failed
devm_memremap() returns an ERR_PTR() value in case of error. However, it returns NULL when memremap() failed. This causes the caller, such as the pmem driver, to proceed and oops later. Change devm_memremap() to return ERR_PTR(-ENXIO) when memremap() failed. Signed-off-by: Toshi Kani <[email protected]> Cc: Andrew Morton <[email protected]> Cc: <[email protected]> Reviewed-by: Ross Zwisler <[email protected]> Signed-off-by: Dan Williams <[email protected]>
- Loading branch information