diff options
-rw-r--r-- | drivers/misc/ocxl/pci.c | 2 |
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) | |||
519 | rc = device_register(&fn->dev); | 519 | rc = device_register(&fn->dev); |
520 | if (rc) { | 520 | if (rc) { |
521 | deconfigure_function(fn); | 521 | deconfigure_function(fn); |
522 | device_unregister(&fn->dev); | 522 | put_device(&fn->dev); |
523 | return ERR_PTR(rc); | 523 | return ERR_PTR(rc); |
524 | } | 524 | } |
525 | return fn; | 525 | return fn; |