Skip to content
Commit d449d69d authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by Greg Kroah-Hartman
Browse files

misc: sram: fix check of devm_ioremap*() return value



Both devm_ioremap() and devm_ioremap_wc() functions return either
a pointer to valid iomem region or NULL, check for IS_ERR() is improper
and may result in oops on error path. Now on error -ENOMEM is returned.

Fixes: 0ab163ad ("misc: sram: switch to ioremap_wc from ioremap")
Signed-off-by: default avatarVladimir Zapolskiy <vz@mleia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 47f55b74
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment