net/mlx4: fix alignment of memory region
authorYongseok Koh <yskoh@mellanox.com>
Tue, 17 Apr 2018 18:39:14 +0000 (11:39 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 27 Apr 2018 14:54:56 +0000 (15:54 +0100)
commit96525b9e193139d11cabaaa6f27801bc636a447a
tree5a6e44f4b1aeff48fa6c5758bf3fb5f977a9ba7d
parenta2ceae594045b3ce019f601d353f72310a505b3d
net/mlx4: 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: c2fe5823224a ("net/mlx4: use virt2memseg instead of iteration")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
drivers/net/mlx4/mlx4_mr.c