summaryrefslogtreecommitdiff
path: root/drivers/misc/ocxl/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/ocxl/pci.c')
-rw-r--r--drivers/misc/ocxl/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/ocxl/pci.c b/drivers/misc/ocxl/pci.c
index 0051d9ec76cc..21f425472a82 100644
--- a/drivers/misc/ocxl/pci.c
+++ b/drivers/misc/ocxl/pci.c
@@ -519,7 +519,7 @@ static struct ocxl_fn *init_function(struct pci_dev *dev)
rc = device_register(&fn->dev);
if (rc) {
deconfigure_function(fn);
- device_unregister(&fn->dev);
+ put_device(&fn->dev);
return ERR_PTR(rc);
}
return fn;