[PATCH OLK-6.6] net/mlx5: Check device memory pointer before usage