diff options
author | Eli Billauer <eli.billauer@gmail.com> | 2013-12-17 23:36:29 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-18 05:07:13 +0400 |
commit | 9340e9dc9d000781a396917d3ca8e5a705cae765 (patch) | |
tree | 7e2121147f8053687c1637c12685ec2ae87435ae /drivers/staging/xillybus | |
parent | 2d32927127f44d755780aa5fa88c8c34e72558f8 (diff) | |
download | linux-9340e9dc9d000781a396917d3ca8e5a705cae765.tar.xz |
staging: xillybus: Return -EIO if *_iomap fails, instead of 0
This patch replicates the correction made by Wei Yongjun on a second
occurrence of the same bug.
The first correction was in commit 8eec4555511bfa1f8a2e0a2de45c988fd30c3efb.
Bug fixed: The error code was not set, so the error condition wasn't reflected
in the return value.
Reported-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/xillybus')
-rw-r--r-- | drivers/staging/xillybus/xillybus_of.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/xillybus/xillybus_of.c b/drivers/staging/xillybus/xillybus_of.c index 394bfea1af6e..3b25b0e100b4 100644 --- a/drivers/staging/xillybus/xillybus_of.c +++ b/drivers/staging/xillybus/xillybus_of.c @@ -131,10 +131,10 @@ static int xilly_drv_probe(struct platform_device *op) } endpoint->registers = of_iomap(dev->of_node, 0); - if (!endpoint->registers) { dev_err(endpoint->dev, "Failed to map I/O memory. Aborting.\n"); + rc = -EIO; goto failed_iomap0; } |