mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
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: 2674f1ef29 ("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
This commit is contained in:
parent
6edeabacb7
commit
63b3360436
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user