]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/xe: Call exit functions when xe_register_pci_driver() fails
authorGustavo Sousa <gustavo.sousa@intel.com>
Thu, 11 May 2023 19:48:22 +0000 (16:48 -0300)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 19 Dec 2023 23:33:51 +0000 (18:33 -0500)
commit9afd4b2d2a8df9023849ddd25d5e064b6555ee34
tree4b80ab3af99b7ae0ab4d63fd71756a74b2d59806
parenta029aecaa42018a9ebc90fbf6e2920acfc4c6b3f
drm/xe: Call exit functions when xe_register_pci_driver() fails

Move xe_register_pci_driver() and xe_unregister_pci_driver() to
init_funcs to make sure that exit functions are also called when
xe_register_pci_driver() fails.

Note that this also allows adding init functions to be run after
xe_register_pci_driver().

v2:
 - Move functions to init_funcs instead of having a special case for
   xe_register_pci_driver(). (Jani)

Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Matt Atwood <matthew.s.atwood@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_module.c