platform/x86: mlx-platform: Fix an ERR_PTR vs NULL issue