diff options
author | Michał Winiarski <michal.winiarski@intel.com> | 2023-11-29 22:44:57 +0100 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 11:45:09 -0500 |
commit | 0d29a76c639900747fd33b0774764aa78c9667da (patch) | |
tree | 6d51851ae7bdaeb7bbf3b56accf2735ec7cce0e6 /drivers/gpu/drm/xe/xe_pci.c | |
parent | 33acfc7172ab7f9690536710f0938b787f16a46e (diff) | |
download | lwn-0d29a76c639900747fd33b0774764aa78c9667da.tar.gz lwn-0d29a76c639900747fd33b0774764aa78c9667da.zip |
drm/xe: Skip calling drm_dev_put on probe error
DRM device used by Xe is managed, which means that final ref will be
dropped on driver detach.
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20231129214509.1174116-2-michal.winiarski@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_pci.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_pci.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c index 1f3b2ce7c044..a38fea281eb0 100644 --- a/drivers/gpu/drm/xe/xe_pci.c +++ b/drivers/gpu/drm/xe/xe_pci.c @@ -706,7 +706,7 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) pci_set_drvdata(pdev, xe); err = pci_enable_device(pdev); if (err) - goto err_drm_put; + return err; pci_set_master(pdev); @@ -754,9 +754,6 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) err_pci_disable: pci_disable_device(pdev); -err_drm_put: - drm_dev_put(&xe->drm); - return err; } |