net/mlx5: register memory callback only when probing
authorDavid Marchand <david.marchand@6wind.com>
Wed, 30 May 2018 14:42:53 +0000 (16:42 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 30 May 2018 19:16:43 +0000 (21:16 +0200)
commit44b1d513d58db0ac54e67715470f9a50643a593b
treebbe812dacb70629b20e03ace79c50d9b6a75cca8
parentad09f8034144d37d550320ffc4b72a7c5ed47446
net/mlx5: register memory callback only when probing

The callback should be invoked only for memory that has been registered
in a device, hence, no need to track cleanup events if no device is
present.

Bugzilla ID: 56
Fixes: 974f1e7ef146 ("net/mlx5: add new memory region support")

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/mlx5/mlx5.c