Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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
(cherry picked from commit 63b33604365bdca43dee41bab809da2230491036)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>

authored by

Shuicheng Lin and committed by
Thomas Hellström
c1ed856c ca8dcfed

+1 -2
+1 -2
drivers/gpu/drm/xe/xe_configfs.c
··· 347 347 return false; 348 348 349 349 ret = pci_get_drvdata(pdev); 350 - pci_dev_put(pdev); 351 - 352 350 if (ret) 353 351 pci_dbg(pdev, "Already bound to driver\n"); 354 352 353 + pci_dev_put(pdev); 355 354 return ret; 356 355 } 357 356