summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShuicheng Lin <shuicheng.lin@intel.com>2026-01-21 17:37:51 +0000
committerAshutosh Dixit <ashutosh.dixit@intel.com>2026-01-28 18:39:30 -0800
commit63b33604365bdca43dee41bab809da2230491036 (patch)
tree0d6abc2238873ca3cf3f475bf4199ee2e7af8720
parent6edeabacb71cfaadb6b406655cdbc53ed40b521c (diff)
drm/xe/configfs: Fix is_bound() pci_dev lifetime
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> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Link: https://patch.msgid.link/20260121173750.3090907-2-shuicheng.lin@intel.com
-rw-r--r--drivers/gpu/drm/xe/xe_configfs.c3
1 files changed, 1 insertions, 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;
}