@@ -244,38 +244,58 @@ int intel_display_driver_probe_noirq(struct intel_display *display)
244
244
intel_dmc_init (display );
245
245
246
246
display -> wq .modeset = alloc_ordered_workqueue ("i915_modeset" , 0 );
247
+ if (!display -> wq .modeset ) {
248
+ ret = - ENOMEM ;
249
+ goto cleanup_vga_client_pw_domain_dmc ;
250
+ }
251
+
247
252
display -> wq .flip = alloc_workqueue ("i915_flip" , WQ_HIGHPRI |
248
253
WQ_UNBOUND , WQ_UNBOUND_MAX_ACTIVE );
254
+ if (!display -> wq .flip ) {
255
+ ret = - ENOMEM ;
256
+ goto cleanup_wq_modeset ;
257
+ }
258
+
249
259
display -> wq .cleanup = alloc_workqueue ("i915_cleanup" , WQ_HIGHPRI , 0 );
260
+ if (!display -> wq .cleanup ) {
261
+ ret = - ENOMEM ;
262
+ goto cleanup_wq_flip ;
263
+ }
250
264
251
265
intel_mode_config_init (display );
252
266
253
267
ret = intel_cdclk_init (display );
254
268
if (ret )
255
- goto cleanup_vga_client_pw_domain_dmc ;
269
+ goto cleanup_wq_cleanup ;
256
270
257
271
ret = intel_color_init (display );
258
272
if (ret )
259
- goto cleanup_vga_client_pw_domain_dmc ;
273
+ goto cleanup_wq_cleanup ;
260
274
261
275
ret = intel_dbuf_init (display );
262
276
if (ret )
263
- goto cleanup_vga_client_pw_domain_dmc ;
277
+ goto cleanup_wq_cleanup ;
264
278
265
279
ret = intel_bw_init (display );
266
280
if (ret )
267
- goto cleanup_vga_client_pw_domain_dmc ;
281
+ goto cleanup_wq_cleanup ;
268
282
269
283
ret = intel_pmdemand_init (display );
270
284
if (ret )
271
- goto cleanup_vga_client_pw_domain_dmc ;
285
+ goto cleanup_wq_cleanup ;
272
286
273
287
intel_init_quirks (display );
274
288
275
289
intel_fbc_init (display );
276
290
277
291
return 0 ;
278
292
293
+ cleanup_wq_cleanup :
294
+ destroy_workqueue (display -> wq .cleanup );
295
+ cleanup_wq_flip :
296
+ destroy_workqueue (display -> wq .flip );
297
+ cleanup_wq_modeset :
298
+ destroy_workqueue (display -> wq .modeset );
279
299
cleanup_vga_client_pw_domain_dmc :
280
300
intel_dmc_fini (display );
281
301
intel_power_domains_driver_remove (display );
0 commit comments