aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-07-29 19:57:06 -0400
committerDavid S. Miller <davem@davemloft.net>2013-07-30 22:33:45 -0400
commita661b43fd047ef501da43a19975415f861c7c3db (patch)
tree4d71eec9732d16636f5307091a9b7ec188f50617
parent5445eaf309ff2868c77354016505fc7315947a35 (diff)
mlx5: fix error return code in mlx5_alloc_uuars()
Fix to return -ENOMEM from the ioremap error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/uar.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/uar.c b/drivers/net/ethernet/mellanox/mlx5/core/uar.c
index 71d4a3937200..68f5d9c77c7b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/uar.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/uar.c
@@ -164,6 +164,7 @@ int mlx5_alloc_uuars(struct mlx5_core_dev *dev, struct mlx5_uuar_info *uuari)
164 uuari->uars[i].map = ioremap(addr, PAGE_SIZE); 164 uuari->uars[i].map = ioremap(addr, PAGE_SIZE);
165 if (!uuari->uars[i].map) { 165 if (!uuari->uars[i].map) {
166 mlx5_cmd_free_uar(dev, uuari->uars[i].index); 166 mlx5_cmd_free_uar(dev, uuari->uars[i].index);
167 err = -ENOMEM;
167 goto out_count; 168 goto out_count;
168 } 169 }
169 mlx5_core_dbg(dev, "allocated uar index 0x%x, mmaped at %p\n", 170 mlx5_core_dbg(dev, "allocated uar index 0x%x, mmaped at %p\n",