net/mlx5: fix alignment of memory region
authorYongseok Koh <yskoh@mellanox.com>
Tue, 17 Apr 2018 18:39:13 +0000 (11:39 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 27 Apr 2018 14:54:56 +0000 (15:54 +0100)
commita2ceae594045b3ce019f601d353f72310a505b3d
treebcffc949cf7e7250d885ec1df5edf2cd1f360898
parentc4fed4ff4fb20dc43036c6874c00846750990704
net/mlx5: fix alignment of memory region

The memory region is [start, end), so if the memseg of 'end' isn't
allocated yet, the returned memseg will have zero entries and this will
make 'end' zero (nil).

Fixes: 718e35999c96 ("net/mlx5: use virt2memseg instead of iteration")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
drivers/net/mlx5/mlx5_mr.c