]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Unmap only the relevant IO memory mapping
authorGal Pressman <galp@mellanox.com>
Sun, 1 May 2016 19:59:54 +0000 (22:59 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 May 2016 17:37:25 +0000 (13:37 -0400)
commitf61212bf85076b17bb04476dc4997b967e89044d
tree3851fc58ba67d794496eea18d18868736fe9ba0c
parent502ee91c1add7fb94f5eecba6456731c2c136596
net/mlx5: Unmap only the relevant IO memory mapping

When freeing UAR the driver tries to unmap uar->map and uar->bf_map
which are mutually exclusive thus always unmapping a NULL pointer.
Make sure we only call iounmap() once, for the actual mapping.

Fixes: f95c792ba257 ('net/mlx5: Fix global UAR mapping')
Signed-off-by: Gal Pressman <galp@mellanox.com>
Reported-by: Doron Tsur <doront@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/uar.c