Commit c1ed856c authored by Shuicheng Lin's avatar Shuicheng Lin Committed by Thomas Hellström
Browse files

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: 2674f1ef ("drm/xe/configfs: Block runtime attribute changes")
Signed-off-by: default avatarShuicheng Lin <shuicheng.lin@intel.com>
Reviewed-by: default avatarAshutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: default avatarAshutosh Dixit <ashutosh.dixit@intel.com>
Link: https://patch.msgid.link/20260121173750.3090907-2-shuicheng.lin@intel.com


(cherry picked from commit 63b33604)
Signed-off-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
parent ca8dcfed
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
}