[PATCH 6.6 062/262] net/mlx5: Check device memory pointer before usage