Unverified Commit 7d3a5962 authored by Dan Carpenter's avatar Dan Carpenter Committed by Rodrigo Vivi
Browse files

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: a843b989 ("drm/xe/vf: Fix VM crash during VF driver release")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://lore.kernel.org/r/aIzB8-Y6wtZvfNQT@stanley.mountain


Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 1cda3c75
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
		}