drm/xe/vf: Fix IS_ERR() vs NULL check in xe_sriov_vf_ccs_init()

The xe_migrate_alloc() function returns NULL on error.  It doesn't return
error pointers.  Update the checking to match.

Fixes: a843b98947 ("drm/xe/vf: Fix VM crash during VF driver release")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://lore.kernel.org/r/aIzB8-Y6wtZvfNQT@stanley.mountain
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
Dan Carpenter 2025-08-01 16:32:35 +03:00 committed by Rodrigo Vivi
parent 1cda3c755b
commit 7d3a5962d7
No known key found for this signature in database
GPG Key ID: FA625F640EEB13CA

View File

@ -271,8 +271,8 @@ int xe_sriov_vf_ccs_init(struct xe_device *xe)
ctx->ctx_id = ctx_id;
migrate = xe_migrate_alloc(tile);
if (IS_ERR(migrate)) {
err = PTR_ERR(migrate);
if (!migrate) {
err = -ENOMEM;
goto err_ret;
}