Skip to content

Commit 2859fa9

Browse files
ShuichengLingregkh
authored andcommitted
drm/xe/configfs: Fix is_bound() pci_dev lifetime
[ Upstream commit c1ed856 ] Move pci_dev_put() after pci_dbg() to avoid using pdev after dropping its reference. Fixes: 2674f1e ("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 63b3360) Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 64364cc commit 2859fa9

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/gpu/drm/xe/xe_configfs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,10 @@ static bool is_bound(struct xe_config_group_device *dev)
258258
return false;
259259

260260
ret = pci_get_drvdata(pdev);
261-
pci_dev_put(pdev);
262-
263261
if (ret)
264262
pci_dbg(pdev, "Already bound to driver\n");
265263

264+
pci_dev_put(pdev);
266265
return ret;
267266
}
268267

0 commit comments

Comments
 (0)