drm/xe: Fail xe_device_create() if wq allocation fails
authorGustavo Sousa <gustavo.sousa@intel.com>
Thu, 18 May 2023 21:56:51 +0000 (18:56 -0300)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 19 Dec 2023 23:34:00 +0000 (18:34 -0500)
commitc93b6de7cc7610a269afe0e84a0b3e2b81a746cd
tree6f9f584ca8734d0715ca42eb2a6699acc2f88a7f
parentb67ece5b173375451de5c3a562c43aaf410001c5
drm/xe: Fail xe_device_create() if wq allocation fails

Let's make sure we give the driver a valid workqueue.

While at it, also make sure to call destroy_workqueue() only if the
workqueue is a valid one. That is necessary because xe_device_destroy()
is indirectly called as part of the cleanup process of a failed
xe_device_create().

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20230518215651.502159-3-gustavo.sousa@intel.com
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_device.c