File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -1219,13 +1219,17 @@ static int vf_guc_min_load_for_hwconfig(struct xe_guc *guc)
1219
1219
1220
1220
ret = xe_gt_sriov_vf_connect (gt );
1221
1221
if (ret )
1222
- return ret ;
1222
+ goto err_out ;
1223
1223
1224
1224
ret = xe_gt_sriov_vf_query_runtime (gt );
1225
1225
if (ret )
1226
- return ret ;
1226
+ goto err_out ;
1227
1227
1228
1228
return 0 ;
1229
+
1230
+ err_out :
1231
+ xe_guc_sanitize (guc );
1232
+ return ret ;
1229
1233
}
1230
1234
1231
1235
/**
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ static int vf_uc_load_hw(struct xe_uc *uc)
158
158
159
159
err = xe_gt_sriov_vf_connect (uc_to_gt (uc ));
160
160
if (err )
161
- return err ;
161
+ goto err_out ;
162
162
163
163
uc -> guc .submission_state .enabled = true;
164
164
@@ -168,9 +168,13 @@ static int vf_uc_load_hw(struct xe_uc *uc)
168
168
169
169
err = xe_gt_record_default_lrcs (uc_to_gt (uc ));
170
170
if (err )
171
- return err ;
171
+ goto err_out ;
172
172
173
173
return 0 ;
174
+
175
+ err_out :
176
+ xe_guc_sanitize (& uc -> guc );
177
+ return err ;
174
178
}
175
179
176
180
/*
@@ -202,15 +206,15 @@ int xe_uc_load_hw(struct xe_uc *uc)
202
206
203
207
ret = xe_gt_record_default_lrcs (uc_to_gt (uc ));
204
208
if (ret )
205
- return ret ;
209
+ goto err_out ;
206
210
207
211
ret = xe_guc_post_load_init (& uc -> guc );
208
212
if (ret )
209
- return ret ;
213
+ goto err_out ;
210
214
211
215
ret = xe_guc_pc_start (& uc -> guc .pc );
212
216
if (ret )
213
- return ret ;
217
+ goto err_out ;
214
218
215
219
xe_guc_engine_activity_enable_stats (& uc -> guc );
216
220
@@ -222,6 +226,10 @@ int xe_uc_load_hw(struct xe_uc *uc)
222
226
xe_gsc_load_start (& uc -> gsc );
223
227
224
228
return 0 ;
229
+
230
+ err_out :
231
+ xe_guc_sanitize (& uc -> guc );
232
+ return ret ;
225
233
}
226
234
227
235
int xe_uc_reset_prepare (struct xe_uc * uc )
You can’t perform that action at this time.
0 commit comments