Commit 99c5952f authored by Matthew Auld's avatar Matthew Auld Committed by Rodrigo Vivi
Browse files

drm/xe/gt: some error handling fixes



Make sure we pass along the correct errors.

Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
Reviewed-by: default avatarGwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 4f1411e2
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -234,7 +234,7 @@ static int emit_nop_job(struct xe_gt *gt, struct xe_engine *e)
	job = xe_bb_create_wa_job(e, bb, batch_ofs);
	if (IS_ERR(job)) {
		xe_bb_free(bb, NULL);
		return PTR_ERR(bb);
		return PTR_ERR(job);
	}

	xe_sched_job_arm(job);
@@ -285,7 +285,7 @@ static int emit_wa_job(struct xe_gt *gt, struct xe_engine *e)
	job = xe_bb_create_wa_job(e, bb, batch_ofs);
	if (IS_ERR(job)) {
		xe_bb_free(bb, NULL);
		return PTR_ERR(bb);
		return PTR_ERR(job);
	}

	xe_sched_job_arm(job);
@@ -545,8 +545,10 @@ static int all_fw_domain_init(struct xe_gt *gt)

	if (!xe_gt_is_media_type(gt)) {
		gt->migrate = xe_migrate_init(gt);
		if (IS_ERR(gt->migrate))
		if (IS_ERR(gt->migrate)) {
			err = PTR_ERR(gt->migrate);
			goto err_force_wake;
		}
	} else {
		gt->migrate = xe_find_full_gt(gt)->migrate;
	}