public inbox for intel-xe@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/configfs: Fix is_bound() pci_dev lifetime
@ 2026-01-21 17:37 Shuicheng Lin
  2026-01-21 18:05 ` ✓ CI.KUnit: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Shuicheng Lin @ 2026-01-21 17:37 UTC (permalink / raw)
  To: intel-xe; +Cc: Shuicheng Lin

Move pci_dev_put() after pci_dbg() to avoid using pdev after dropping its
reference.

Fixes: 2674f1ef29f46 ("drm/xe/configfs: Block runtime attribute changes")
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
---
 drivers/gpu/drm/xe/xe_configfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c
index 9f6251b1008b..82edd0466005 100644
--- a/drivers/gpu/drm/xe/xe_configfs.c
+++ b/drivers/gpu/drm/xe/xe_configfs.c
@@ -347,11 +347,10 @@ static bool is_bound(struct xe_config_group_device *dev)
 		return false;
 
 	ret = pci_get_drvdata(pdev);
-	pci_dev_put(pdev);
-
 	if (ret)
 		pci_dbg(pdev, "Already bound to driver\n");
 
+	pci_dev_put(pdev);
 	return ret;
 }
 
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-01-22 16:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-21 17:37 [PATCH] drm/xe/configfs: Fix is_bound() pci_dev lifetime Shuicheng Lin
2026-01-21 18:05 ` ✓ CI.KUnit: success for " Patchwork
2026-01-21 18:31 ` [PATCH] " Dixit, Ashutosh
2026-01-21 18:40 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-01-22  3:49 ` ✗ Xe.CI.Full: failure " Patchwork
2026-01-22 16:41   ` Lin, Shuicheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox