File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -585,6 +585,17 @@ static void idxd_read_caps(struct idxd_device *idxd)
585
585
idxd -> hw .iaa_cap .bits = ioread64 (idxd -> reg_base + IDXD_IAACAP_OFFSET );
586
586
}
587
587
588
+ static void idxd_free (struct idxd_device * idxd )
589
+ {
590
+ if (!idxd )
591
+ return ;
592
+
593
+ put_device (idxd_confdev (idxd ));
594
+ bitmap_free (idxd -> opcap_bmap );
595
+ ida_free (& idxd_ida , idxd -> id );
596
+ kfree (idxd );
597
+ }
598
+
588
599
static struct idxd_device * idxd_alloc (struct pci_dev * pdev , struct idxd_driver_data * data )
589
600
{
590
601
struct device * dev = & pdev -> dev ;
@@ -857,7 +868,7 @@ static int idxd_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
857
868
err :
858
869
pci_iounmap (pdev , idxd -> reg_base );
859
870
err_iomap :
860
- put_device ( idxd_confdev ( idxd ) );
871
+ idxd_free ( idxd );
861
872
err_idxd_alloc :
862
873
pci_disable_device (pdev );
863
874
return rc ;
You can’t perform that action at this time.
0 commit comments